Answer to Question #328945 in Software Engineering for naqib ullah

Question #328945

int main()

{

const int N = 8;

string names[] = {"Jack","John","Mary","Mike","Helen","Phill","Sew","Elis"};

char grades[] = {'B','E','A','D','C','F','E','B'};

cout << "Table with grades of students:\n";

for (int i = 0; i < N; i++)

{

cout << names[i] << "\t" << grades[i] << endl;

}

char maxgrade = grades[0];

int n=0;

for (int i = 0; i < N; i++)

{

if(grades[i]<maxgrade)

{

maxgrade = grades[i];

n=i;

}

}

cout << "The best grade is " << grades[n]

<< "\nIt has " << names[n];

}

please understand the code me by comments so please do it.


0
Service report
It's been a while since this question is posted here. Still, the answer hasn't been got. Consider converting this question to a fully qualified assignment, and we will try to assist. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS