Advertisement
Guest User

Untitled

a guest
Sep 18th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n,x,cnt1,cnt2;
  8.     cin>>n;
  9.     for(int i=1; i<=n; i++)
  10.     {
  11.         cin>>x;
  12.         if(x>=10 && x<=20)
  13.             {cnt1++;}
  14.         else if(x<10 && x>20)
  15.             {cnt2++;}
  16.     }
  17.     cout<<cnt1<<" in";
  18.     cout<<cnt2<<" out";
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement