Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int Hight[22];
- int r;
- int i = 0;
- int amount = 0;
- cout << "Enter the r number: " << endl;
- cin >> r;
- cout << "Enter the hight of the students: " << endl;
- for (i = 0; i < 22; i++) {
- cin >> Hight[i];
- }
- for (i = 0; i < 22; i++) {
- if (Hight[i]>r) {
- amount++;
- }
- }
- cout << "Amount of students higher than _r_ is: " << amount;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement