Q. Write a program that inputs marks of ten students. The program displays the numbers of students in each grade. The criteria is as follows:
80 or above A
60 to 79 B
40 to 59 C
Below 40 F
1
Expert's answer
2016-02-08T07:37:35-0500
#include <iostream>
using namespace std;
int main() { /* ** Each item is a grade (A, B, C ,F), wich stores ** the number of students who received her */ uint32_t grades[4] = {0};
cout << "Enter student marks:" << endl;
uint32_t mark = 0;
for(uint32_t i = 0; i < 10; i++) { cin >> mark;
if ( mark >= 80 ) grades[0]++; else if ( mark >= 60 ) grades[1]++; else if ( mark >= 40 ) grades[2]++; else grades[3]++; }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment