Answer to Question #37914 in C++ for dagim
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
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!
Learn more about our help with Assignments:
C++
Comments
very nice
Leave a comment