Advertisement
dzieciol

Labolatorium III zadanie 1

Oct 29th, 2015
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.45 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {int c,pom,par=0,dod=0,podz=0, i;
  6.     printf("Podaj ilew liczb chcesz wprowadzic");
  7.     scanf("%d",&c);
  8.     for(i=1;i<c;i++){
  9.         printf("podaj liczbe");
  10.         scanf("%d",&pom);
  11.         if(pom%2==0)par++;
  12.         if(pom>0)dod++;
  13.         if(pom%5==0)podz++;
  14.     }
  15.     printf("podales %d liczb parzystych %d liczb dodatnich i %d liczb podzielnych przez 5",par,dod,podz);
  16.  
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement