Basic Program but I need HELP

This is a discussion on Basic Program but I need HELP within the C Programming forums, part of the General Programming Boards category; I have to write this program that does the following: You are to implement a C++ program that meets the ...

  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    16

    Question Basic Program but I need HELP

    I have to write this program that does the following:

    You are to implement a C++ program that meets the following criteria:
    1) Retrieves the number of records from the beginning of a file
    2) Perform a counted loop (while/for) that will iterate for each of the records.
    3) These records will consist of the FORM:
    numberofgrades name grade1 …. GradeN
    example: 5 Mike 100 100 100 100 100
    4) Calculates an average as well as the concepts of the min/max
    grade entered for that particular student.
    5) Perform error checking on each entered grade received to ensure
    it is valid, since we are getting this input from a file, error
    messages should be supressed when they occur but during
    output should be noted.


    I am in an introductory course and this is our second project. Myself along with the rest of the class is completely confused... I'm not asking for a complete code from someone, just some guidance. I really do not know much about the C/C++ language due to lack of proper teaching and the book is just as confusing.

    The input should look like this:
    2 // total number of students
    5 Terry 100 100 100 100 100 // the first student “record”
    2 Susan 100 100 // the next student “record”

    The output should look like this:
    Student name: Student Average: Min: Max:
    Name1 average1 min1 max1
    Name2 average2 min2 max2

    People keep asking if know how to use arrays and stuff but we haven't learned any of that. We know the very very basics and thats all. Somehow the prof wants us to open another file that I believe will have the code w/ formulas but I dont understand why we need another file....something to do with header files too, I just don't know what these all are and how to use them. I read the book so I dont want to hear read the book and go to class because I do every week...I just need help getting started and understanding why we need header files and to open a file and as far as the input.... is it even possible to input the numbers and name like that? i didnt think that the comp would recognize that. anyways can someone help me out? oh also we're studying swapping... i kind of understand that but not exactly how to write it. thanks for your time

  2. #2
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,048
    You are to implement a C++ program that meets the following criteria
    There is a C++ forum.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  3. #3
    Registered User
    Join Date
    Oct 2005
    Posts
    16
    i switched it over to the c++ board....

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 12:27 PM
  2. Basic encryption program???
    By Finchie_88 in forum C++ Programming
    Replies: 14
    Last Post: 09-10-2004, 09:01 AM
  3. IDEA: A basic drawing program
    By ygfperson in forum Contests Board
    Replies: 0
    Last Post: 08-12-2002, 11:15 PM
  4. Replies: 2
    Last Post: 05-10-2002, 04:16 PM
  5. Help me with this basic c program
    By [ToXiC]-[LeaK] in forum C Programming
    Replies: 1
    Last Post: 01-28-2002, 10:44 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21