You are given two parallel arrays that have already been loa
Solution
/*
pseudo code:
declare and initialize arrays
iterate over the arrays
check if score is greater than 75
output name and score
end for loop
end code
*/
// C++ code
#include <iostream>
#include <fstream>
#include <cctype>
#include <cstring>
#include <stdlib.h> /* srand, rand */
#include <iomanip>
#include <limits.h>
#include <cmath>
#include <algorithm>
#include <vector>
#include <stack>
#include <string.h>
using namespace std;
int main()
{
// initialize size , name and score array
int size = 7;
string name[] = {\"Sara Jones\",\"Jean Baker\",\"Donna Smith\",\"Chris Johnson\",\"Clay Barker\",\"Lori Davis\",\"Ana Enrique\"};
int score[] = {52,93,55,78,98,68,73};
// check scores which are greater than 75
cout << \"Students withs score greater than 75:\ \";
for (int i = 0; i < 7; ++i)
{
// output the scores and name greater than 75
if(score[i] > 75)
{
cout << \"Name: \" << name[i] << \"\\t\" << \"Score: \" << score[i] << endl;
}
}
return 0;
}
/*
output:
Students withs score greater than 75:
Name: Jean Baker Score: 93
Name: Chris Johnson Score: 78
Name: Clay Barker Score: 98
*/
![You are given two parallel arrays that have already been loaded with data. The parallel arrays are: names[ ] – which includes all Student names and Score[ ] – w You are given two parallel arrays that have already been loaded with data. The parallel arrays are: names[ ] – which includes all Student names and Score[ ] – w](/WebImages/34/you-are-given-two-parallel-arrays-that-have-already-been-loa-1098739-1761580035-0.webp)
![You are given two parallel arrays that have already been loaded with data. The parallel arrays are: names[ ] – which includes all Student names and Score[ ] – w You are given two parallel arrays that have already been loaded with data. The parallel arrays are: names[ ] – which includes all Student names and Score[ ] – w](/WebImages/34/you-are-given-two-parallel-arrays-that-have-already-been-loa-1098739-1761580035-1.webp)