63 125
Assignments Done
99%
Successfully Done
In July 2018

Answer to Question #30598 in C++ for saleshni

Question #30598
Formula for adding numbers from 1 to 100 in C++ programme
Expert's answer
#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

Submit
Privacy policy Terms and Conditions