0
Fill in the blanks to enter five numbers from the user and print their sum. Store the sum in the variable named total.
int x = 1; int number; int total = 0; (x <= 5) { cin >> number; = total + number; x++; } cout << "Sum: " << << endl;
4 odpowiedzi
+ 2
int x=1;
int number;
int total=0;
while(x<=5){
cin>>number;
total=total+number;
x++;
}
cout<<"sum:"<<total<<endl;
+ 1
answer is :
1.while
2.total
3.total
0
int x=1;
int number;
int total=0;
while(x<=5){
cin>>number;
total=total+number;
x++;
}
cout<<"sum:"<<total<<endl;
0
while
total
total