Originally Posted by Elysia
Put a different way: what does the code do? Can you write it in pseudo code? How does it work?
I already did I just don't know how to take the sum of the loop's value. You then said total_resistance += entered_resistance ;
and I did that and I didn't get the right answer and I have no idea what to do next so thats where I am at now.
I got it and it works. I set the total_resistance = 0 and now it works. I also put it inside the for loop. Thanks for the help.
Putting it inside the for loop was the answer.
Originally Posted by Adak
io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
Originally Posted by Salem
You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.
Outside of your DOS world, your header file is meaningless.
Originally Posted by fry8
total_resistance += entered_resistance ;
Put this thing inside the loop :-)
A little late to the party.
Plus, it would be good if you don't spoil answers to such elementary logic problems.
Logic problems are great exercises for newbies which they really must master.