76 337
Assignments Done
Successfully Done
In May 2019

Answer to Question #13567 in C++ for maverick

Question #13567
write a program to read 10 integers. then add up the calues of each of the individual digits and print out the sum (use while loop)
Expert's answer
#include <iostream>

using namespace std;

int main()
int sum = 0;
int number;
cout<<"Enter 10 numbers: ";
for (int i=0;i<10;i++)
& cin>>number;
& while (number!=0)
& {
& }
cout<<"Sum of all the digits: "<<sum<<endl;
return 0;

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!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions