Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <conio.h>
- #include <math.h>
- main(){
- int x, rzuty, wynik, licznik=0;
- int pom1 = 0;
- printf("Ile rzutow? ");
- scanf("%d", &rzuty); // podaje licz
- int i = 0;
- for(x=0; x<rzuty; x++)
- {
- printf("Podaj %d rzut: \n", x);
- scanf("%d", &pom1);
- if(pom1 == 6)
- {
- licznik++;
- }
- }
- printf("6 wypadla %d razy \n", licznik);
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment