64 542
Assignments Done
99,3%
Successfully Done
In September 2018

Answer to Question #4799 in C++ for Saurabh Kaura

Question #4799
Write a C++ program to allow the user to enter any ten numbers and then display their sum using for loop.
Expert's answer
#include <iostream.h>
#include <conio.h>
main(){
int i,a,s;
s=0;
for (i=1;i<=10;i++){
& cout<<"Enter a number: ";
& cin>>a;
& s = s+a;
}
cout<<"Sum = "<<s;
getch();
}

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