22nd Apr 2018, 2:55 PM
Abdulla Nasri
Abdulla Nasri - avatar
2 Answers
+ 2
I'm guessing your code is: if(int=1;i<=15;i+=3) sum+=i; cout<<"sum="<<sum; Your mistake: "if(int=1;" should be "for(int i=1;". If your code doesn't have "int sum=0;", it must be added prior to your code above.
22nd Apr 2018, 3:26 PM
John Wells
John Wells - avatar
+ 1
The code is fragmented please link it or paste it into the description
22nd Apr 2018, 3:06 PM
TurtleShell
TurtleShell - avatar