Can you sum up sampleData1 and then sampleData2 and add the results together?
In the first loop:
totalSampD1 += sampleData1;
and in the second loop:
totalSampD2 += sampleData2;
Then
total = totalSampD1 + totalSampD2;
|
Quote:
|
|
What is the program supposed to do? What is written into the output file?
|
Can you write out description of what the program is to do in simple steps? where each step does one simple thing. From beginning to end of the processing to be done. List each step on a separate line.
For example here are the steps you take when walking:
Shift weight to right foot.
Lift left foot
move left foot forward
put left foot on the ground
shift weight to left foot
lift right foot off the ground
move right foot forward
put right foot on the ground
Go back to step one and repeat