I need my output to look like this:
Sample output:
Student 1 – passed – 19 correct, 1 wrong
Incorrect answers:
# 3
Student 2 – passed – 16 correct, 4 wrong
Incorrect answers:
#1
#4
#8
#19
Student 3 – failed – 14 correct, 6 wrong
Incorrect answers:
#2
#5
#8
#10
#12
#17
I did all of this, now I need to know how to the do correct answer display.
# include %26lt;iostream.h%26gt;
# include %26lt;iomanip.h%26gt;
#include %26lt;ctype.h%26gt; // needed for toupper
#include %26lt;stdlib.h%26gt;// needed for rand
#include %26lt;fstream.h%26gt;
nt main()
{
char ans[20] = {'B', 'D', 'A', 'A', 'C', 'A', '
B', 'A', 'C', 'D', 'B', 'C', 'D', 'A',
'D', 'C', 'C', 'B', 'D', 'A'};
char answer[3][20];
int person[3][20];
int correct[3]={0,0,0};
int wrong[3]={0,0,0};
Help with small c++ problem?
nt main or int main what all problems are you facing ? Print the output of your program.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment