1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

infile outfile struct

Discussion in 'C' started by Deo, Mar 16, 2013.

  1. Deo

    Deo New Member

    Joined:
    Mar 16, 2013
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    HELP ME PROGRAMMERS!!!
    I’m struggling with this problem, can anyone help with me code this one in C++? So I’m calling the attention of the next Steve Jobs or Bill Gates, it could be you! I’m a computer enthusiast but a beginner and lacks knowledge in C++ programming. I terribly need it before March 18,2013, Monday(Philippine time). Please reply me to my email address: deocollao@yahoo.com



    Input file name: scores.in
    Output file name: scores.out

    Write a program that reads student’s names (lastname, firstname) followed by their test scores. The program should output each student’s name followed by their test scores and the relevant grade. It should also find and print the highest test score and the name of the students having the highest score.
    Student data should be stored be stored in a struct variable of type studentType, which has four components: studentFName and studentLName of type string, testScore of type int (testScore is between 0 and 100), and grade of type char. Use the A-F grading scheme. Suppose that the class has 20 students, use an array of 20 components of type studentType.
    Your program must contain at least the following functions:
    a. A function to read the student’s data into the array.
    b. A function to assign the relevant grade to each student.
    c. A function to find the highest test score.
    d. A function to print the names of the students having the highest test score.
    Your program must output each student’s name in this form: last name followed by a comma, followed by the first name. Moreover, other than declaring the variables and opening the input and output files, the function main should only be a collection of function calls.


    Please help me with this...Thank you
     
  2. rejsertil

    rejsertil New Member

    Joined:
    May 21, 2013
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Example function that reads a of timesteps to get the averages % and put back into the structure result array m.infile specifies the name of the input text file. If the file is located in the same folder as name-struct .
     

Share This Page