Guest User

Untitled

a guest
Nov 12th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.62 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int n,i,count1=0,count2=0,count3=0,count4=0;
  5.  
  6.     for(i=1;i<6;i++)
  7.     {
  8.         scanf("%d",&n);
  9.         if(n%2==0)
  10.         {
  11.            count1++;
  12.  
  13.         }
  14.         if(n%2!=0)
  15.         {
  16.             count2++;
  17.  
  18.         }
  19.         if(n>0)
  20.         {
  21.             count3++;
  22.  
  23.         }
  24.         if(n<0)
  25.         {
  26.             count4++;
  27.  
  28.         }
  29.  
  30.     }    printf("%d valor(es) par(es)\n",count1);
  31.  
  32.      printf("%d valor(es) impar(es)\n",count2);
  33.       printf("%d valor(es) positivo(s)\n",count3);
  34.  
  35.        printf("%d valor(es) negativo(s)\n",count4);
  36.     return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment