76 371
Assignments Done
Successfully Done
In May 2019

Answer to Question #23138 in C++ for fadil

Question #23138
Write a C++ program that uses while loop to prompt the user to enter 10 integers and the program will calculate the total for all numbers that are smaller than 20. Display the total.
Question 5
Expert's answer
#include <iostream>

using namespace std;

int main()
cout << "enter 10 numbers" << endl;
int k[10];
for(int i=1;i<=10;i++)
& cin>>k[i];



& for(int i=1;i<=10;i++)

& if(k[i]<20){cout<<k[i]<<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