Ok im writing a Program in EasyC (same outpout as C++)
and our assignment is to write a program to add add all the odd numbers from 0 to 100.
I was trying something along the line of int x =1, and then do something like Counter = x+2; if x%26lt;=100
if someone can help me out with this code i would greatly appreciate it, thanks!
C programming sum of odds?
C or C++?
You'll need something like:
for (x = 1; x %26lt; 100; x = x +2)
total = total +x;
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment