Advertisement
xCmg

2447 - Uri

Mar 20th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdio>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.   int amountVisitor, heiMin, heiMax, visitorAllow = 0, visitor;
  8.  
  9.   cin >> amountVisitor >> heiMin >> heiMax;
  10.  
  11.   while(scanf("%d", &visitor) != EOF && amountVisitor > 1){
  12.     if(visitor >= 50 && visitor <= 250 && visitor <= heiMax && visitor >= heiMin){
  13.       visitorAllow++;
  14.     }
  15.     amountVisitor--;
  16.   }
  17.  
  18.   cout << visitorAllow << endl;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement