c++ - File input separation -


Currently, I am writing a program for a class, and we must use file input and output. He gave us a file, which is 8 separate sets of 7 numbers (all integers) we have to enter the user who wants to read it, and then the highest number, the least number, the sum of the set of numbers and the set The average of is produced. I have a problem asking XCode to read a line of numbers. I do not have much practice with the getline () function, even if it is a solution too.

Any suggestions?

This is a homework assignment, it is the efficiency to sacrifice that you find a certain subject, But the code should give you a vague idea.

Note ** This works only when you can enter the user only one line and exits the program

  cout & lt; & Lt; "Enter the row ..."; Cin & gt; & Gt; Line; // Error Check Line is within the limit / lines / Loop line (for loop) through 7 loops / loops through loops / // vars // end loop / // loop through array Array) for // loop) // sum array [i] on the amount // is this number higher than high? If so, set equal to element of higher array / / is it less than less variable? If so, set less equal to array element / end loop    

Comments

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -