Answer to Question #30598 in C++ for saleshni

Question #30598
Formula for adding numbers from 1 to 100 in C++ programme
1
Expert's answer
2013-05-17T10:09:00-0400
#include <iostream>
using namespace std;

int main() {
int sum = 100 * 101 / 2;
cout << "sum from 1 to 100 is " << sum << endl;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS
paypal