#include #include using namespace std; int main(){ string names[]={"jason", "jack", "jill", "anne","nancy"}; double hw1[] = {99,66,77,88,70}; double hw2[] = {100,44,66,77,88}; double hw3[] = {99,88,77,99,88}; string student; bool found = false; cout << "Enter student name to look up: "; cin >> student; for( int i = 0; i < 5; i++ ){ if( student == names[i] ){ //we have found the student cout << names[i] <<"'s grades are: "<< endl; cout << hw1[i] << " " << hw2[i] << " " << hw3[i] << endl; found = true; break; } } if( !found ){ cout << "Student "<< student << " not found"<< endl; } return 0; }