How to avoid the output for
10 appears 3 times.
20 appears 3 times.
repeat at each line. Im just want one only.
10 appears 3 times.
20 appears 3 times. s610
6 29 69 74 95 103 110 132
10 appears 3 times.
20 appears 3 times. s611
2 7 29 70 75 100 104 111
10 appears 3 times.
20 appears 3 times. Press any key to continue
for (int j = 0; j < students.at (i).examcode.size (); j++)
cout << students.at (i).examcode.at (j) << "\t"; // output list of exam codes for this student
cout <<"\n"<<endl;
/*------------------------
counting elements in array
------------------------*/
int myints[] = {10,20,30,30,20,10,10,20}; // 8 elements
mycount = (int) count (myints, myints+8, 10);
cout << "10 appears " << mycount << " times.\n";