Thread: C++ Programing - Student Program with if statement, loops and histogram

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Nov 2012
    Posts
    5

    Post 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
    Last edited by raheelarehman; 11-25-2012 at 03:25 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. a histogram program
    By makonikor in forum C Programming
    Replies: 33
    Last Post: 04-17-2010, 01:17 AM
  2. Adding statement between loops
    By SilentPirate007 in forum C Programming
    Replies: 4
    Last Post: 03-01-2010, 04:55 AM
  3. loops in a main statement....
    By xero18 in forum C Programming
    Replies: 8
    Last Post: 10-30-2005, 09:36 PM
  4. Student Grade Program
    By Vinod Menon in forum C Programming
    Replies: 5
    Last Post: 05-28-2004, 02:49 PM
  5. Loops using while statement?????
    By bearcat19 in forum C Programming
    Replies: 1
    Last Post: 01-28-2002, 11:17 AM

Tags for this Thread