Advertisement
PROFESSOR_AIH

Interval 2

Mar 29th, 2022
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.30 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int num,i,n,in=0,out=0;
  5.     scanf("%d",&num);
  6.     for(i=1; i<=num; i++)
  7.     {
  8.         scanf("%d",&n);
  9.         if(n>=10 && n<=20)
  10.         {
  11.             in++;
  12.         }
  13.         else
  14.             out++;
  15.     }
  16.     printf("%d in\n%d out\n",in,out);
  17.     return 0;
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement