I'm not asking for the answer, just a nudge in the right direction. First time posting so I appreciate any help! I'm trying to create a for loop to find the average from a set of data after pulling that data from said file. There are 3 total scores for the exam and thought the initial exam would be listed as the first data point, 1, and go up to 3 as theirs 3 exams, but this isn't working. Again not asking for the answer, just really struggling and not sure where to turn.
#Creating an Average from a file of data
15 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
There's something wrong with this part of your code
for (int exam = 1; exam <= 3; number++)
{
sum = sum + number;
total = total + 1;
}
There are a couple of other parts that are wrong or I'm not sure what you're doing
Thanks for the input. To be honest, I'm completely lost. I don't know how to create a for loop to find the average of a set of data a in txt file. I'm trying my best to understand it but I have no clue what I'm doing. I don't understand fully how to create a for loop so I'm trying to read and learn on the go.
Thank you for this! I really appreciate it!
after reading through it, if you have any questions we'll be glad to help
thank you again. I really appreciate the support
@desert gyro Has your question been resolved? If so, type !solved :)
when you say thanks the bot assumes your problem was solved
you don't have to do it yet
oh ok, good to know