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
1
Expert's answer
2013-12-20T10:28:15-0500
#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

melesmk
22.11.20, 09:41

very nice

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS