My orders
How it works
Examples
Reviews
Blog
Homework Answers
Submit
Sign in
How it works
Examples
Reviews
Homework answers
Blog
Contact us
Submit
Question #57640
Q. Write a program to display the following formate using while loop:
Num sum
1 1
2 3
3 6
4 10
5 15
Expert's answer
Solution
#include <iostream>
using namespace std;
void main()
{
int sum=0;
for(int i=1;i<=5;i++)
{
sum+=i;
cout<<i<<' '<<sum<<endl;
}
}
Our fields of expertise
Programming
Math
Engineering
Economics
Physics
LATEST TUTORIALS
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult. You can find this expert in "Assignmentexpert.com" with confidence. Exceptional experts! I appreciate your help. God bless you!
#340153
on Dec 2023
Read all reviews >>