C++ Programing - Student Program with if statement, loops and histogram
HI, Im a beginner in C++, I was wondering if anyone could help me in the assignment? I need to make a code which would do the following;
- get the marks from the user,
-add them into the categories ( 0-25, 30-39, 40-69, 70-100)
and i know that i need to make to a loop either a for or while.
- and finally display them into a histogram,
I have roughly made a pseudo code:
Read in the marks
get the first mark
WHILE mark <= 100
Add the mark to the category
if mark is between 0 and 29
Add 1 to category1 counter
if mark is between 30 and 39
Add 1 to category2 counter
Count the number of marks
Get the next mark
Count the number of marks
Display a histogram of all the categories
display the range “0-29 “
FOR each mark in category1
Display a ‘*’
Display the total number of students
I would be very grateful for the help I'll receive from your comment. Thank you