Hello again! More homework help, again I feel like I just need a push in the right direction. Here are the homework instructions;
HW 5 reads three columns of numbers, column 2 and 3 are separated by a colon. The first two are integers and the third is floating point. Ignore data in the row if there is a zero in column 1. If first number is 1, take the average of column 3. If there column 1 and 2 both have a 1, find the max of column 3. If there is a 1 in column 1 and a 0 in column 2, find minimum of column 3. Max, min, and average are printed with a %7.2f. If there is a -1 in column 1, the set of numbers have ended.
My questions are;
(1) How does the user enter the numbers in a column? Every time I hit enter to move to the next line, it commands the program to run.
(2) Should I just enter the numbers separated by a space or comma?
(3) If I use an array(s), can I use multiple arrays in one program? Meaning, can I use two int arrays or do I have to make it a multidimensional array?
(4) If I use arrays, how would I write the code so the user inputs the numbers?
(5) And finally, for either way I go, how in the heck do I get the program to check the first and second numbers of the columns? (I think this is where my biggest hang up comes from, I am totally blank here!)
I really don't have much code written yet, as I don't really know which direction to go. Thanks for any help you can give!