Dec 21, 2017 at 7:07pm UTC
A PROGRAM THAT READS IN THE EXAMINATION NUMBER OF CANDIDATES IN RANGE OF 0-32768 TOGETHER WITH THE PERCENTAGE MARKS ATTAINED IN A GIVEN EXAMINATION .THE MARKS SHOULD BE GRADED AS FOLLOWS ;
OVER 70%,A; 60-69%,B; 50-59%,C; 40-49%,D; BELOW 40%,F.
THE PROGRAM SHOULD PRINT UNDER SUITABLE HEADINGS ,CANDIDATES NUMBERS ,MARKS AND GRADE FOR EACH CANDIDATES .ARRANGE THE PROGRAM TO STOP WHEN INVALID CANDIDATE NUMBER IS ENTERED .
SOLUTION SHOULD EXERCISE PROPER USE OF FUNCTIONS TO MAKE CODE MODULAR.
Dec 21, 2017 at 7:41pm UTC
I don't see how it can be either. What is this for, a school that makes the students feel good about themselves for failing everything? I mean really, 60 is a B?! That is INSANE.
90+ A 80+ B 70+C and then F ... that was what we had back when people had to try to succeed... grumble...
Dec 21, 2017 at 9:15pm UTC
lol bruh have you ever had a Chemistry class?
Everyone does poorly, but they curve it so a 60% being a B actually sounds kinda reasonable.
Dec 21, 2017 at 11:24pm UTC
I had chem at ga-tech .. don't recall anything like passing at 50% retention though. Only took the first 2 chems. Wife did all the organic and physical etc classes. I lost interest when it stopped exploding.
Dec 22, 2017 at 6:40pm UTC
That marks grading seen as low ! for reality is not true! it depends much on your academic level directly to the weight of your subject !
Dec 22, 2017 at 7:26pm UTC
The premise of your question is slightly wrong because the question is not defined for mark = 70%.
Assuming a 70% is an A...
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
std::cout << "Enter number of candidates: ";
if (std::cin >> num_candidates)
for ( int i = 1; i <= num_candidates; i++)
std::cout << "Enter percentage mark: ";
std::cin >> mark;
std::cout << "#" << i << ": " << mark << " ("
<< static_cast< char>((4 - std::min(4, std::max(mark/10 - 3, 0)))*1.25+ 'A') << ")" << std::endl;
Last edited on
Dec 23, 2017 at 3:34am UTC