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)
#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)
& {
sum+=number%10;
number/=10;
& }
}
cout<<"Sum of all the digits: "<<sum<<endl;
return 0;
}