trojanxem

Untitled

Mar 2nd, 2013
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <conio.h>
  3. #include <math.h>
  4.  
  5.  
  6. main(){
  7. int x, rzuty, wynik, licznik=0;
  8. int pom1 = 0;
  9. printf("Ile rzutow? ");
  10. scanf("%d", &rzuty); // podaje licz
  11. int i = 0;
  12. for(x=0; x<rzuty; x++)
  13. {
  14.     printf("Podaj %d rzut: \n", x);
  15.     scanf("%d", &pom1);
  16.     if(pom1 == 6)
  17.     {
  18.         licznik++;
  19.     }
  20.  
  21.  
  22. }
  23. printf("6 wypadla %d razy \n", licznik);
  24. getch();
  25. return 0;
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment