954,498 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Simple Histograms - Please help...

Hi, all. Thie following is an additional step in the program I previously mentioned [and, by the way, thanks for the responses; most helpful!] The final part of this project is to create [I believe it is called a histogram] of the grade frequency distribution. The program asks for grades of 7 students [using arrays] and inserting a midterm, final, project, average and end grade [converting numeric average to letter grade.] The frequency chart will look like the following. Any ideas on coding this.

Grade Frequency Distribution:

A B C D F
__________________
2 2 1 1 1


meaning that the total students [7] received the following grades.

Thanks for taking your time to look at this.

-R

rharvison
Newbie Poster
11 posts since Feb 2005
Reputation Points: 11
Solved Threads: 0
 

>Any ideas on coding this.
Yes, plenty. However, what I think doesn't matter since it's your program. What did you come up with before posting here?

Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

That, of course, is the problem. I would imagine I would need to total the grades [how many A's, how many B's, etc.] and have it print in a horizontal line.

I have an example, but not certain this works for this sort of problem:

for (indx = 0; indx < num_std; ++indx)
total_grade[indx] = avg[indx]

Sorry, ... any ideas, or am I not giving you enuf?

rharvison
Newbie Poster
11 posts since Feb 2005
Reputation Points: 11
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You