How can you add numbers without using a formula in C++. Like adding 1+2=3 then 3+3=6 all the way up to 5,000,000
This is a discussion on Help within the C++ Programming forums, part of the General Programming Boards category; How can you add numbers without using a formula in C++. Like adding 1+2=3 then 3+3=6 all the way up ...
How can you add numbers without using a formula in C++. Like adding 1+2=3 then 3+3=6 all the way up to 5,000,000
With a loop.
Mac and Windows cross platform programmer. Ruby lover.
Quote of the Day
12/20: Mario F.:I never was, am not, and never will be, one to shut up in the face of something I think is fundamentally wrong.
Amen brother!
I know you would have to use a while or a for loop. what would it look like if i used a while loop
You are perhaps misunderstanding how things work around here. You prove you've made an attempt (post code or pseudocode) and then we help with your mistakes.
We do not just blatantly give out code solutions.
My homepage
Advice: Take only as directed - If symptoms persist, please see your debugger
Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"