64 593
Assignments Done
99,2%
Successfully Done
In September 2018

Answer to Question #37914 in C++ for dagim

Question #37914
read 10 integers from the keyboard in the range of 0-100, and count how many of them are larger than 50 and display the result
Expert's answer
#include using namespace std;

int main()
{
int n;
int counter = 0;
for(int i = 0 ; i < 10; ++i)
{
cin >> n;
if(n > 50)
++counter;
}
cout << counter << 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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions