-
How would I do this?
I have a data file filled with random numbers, I need to read the numbers into an array and count the numbers read. Maybe Im just being an idiot right now, but for some reason I can't think of how to count how many numbers were read. How do I write that?
-
That depends on the specific format of the numbers in the file. Are the numbers each on a separate line, or all on the same line. Do they have a space between numbers, or what is used to separate one number from the next?
Adak
-
Deathray Engineer
Use a loop. Have a counter variable that is initialized to 0 and increased for every number read. You then have the amount of numbers read.
Popular pages
Recent additions