Question: Can someone help me with my C++ code? It's suppose to read from a file called rainfall_data.txt and display the average number of days without
Can someone help me with my C++ code? It's suppose to read from a file called "rainfall_data.txt" and display the average number of days without receiving rainfall greater than or equal to 0.10". Everything works except for one thing. Some of the data in the file looks like this:
0.13 0.00 T 0.00 0.00 0.00 T 1.61 0.00 0.93 0.00 0.23
And when I run it I get an error because of the "T". Is there a way to make the T value equal to 0.01 so I dont have to manually change it by hand? Thank you.
#include
while(inFileStr >> value) { myArray[i] = value; i++; }
int l=0; for(int k=0;k
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
