I am trying to write a program that takes in 5 numbers from a user and then add the numbers to get the sum.
I declared
int a,b,c,d,e,sum; so that those would be my varibles.
I get all the numbers typed in in the program but the addition part makes no sense.
I tried
%d=%d+%d+%d+%d+%d, &sum, &a, &b, &c, &d, &e;
I get a bunch of errors saying syntax error found. found 'd' expecting";"
Your help is greatly appreciated.
2007-02-09
07:10:06
·
4 answers
·
asked by
schrickhellcat
1
in
Computers & Internet
➔ Programming & Design