Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // trojanxem
- #include<stdlib.h>
- #include<cstdio>
- #include<conio.h>
- #include<time.h>
- #include<math.h>
- int main()
- {
- int i, odleglosc, punkt_k, ilosc_zaw;
- printf("Ilu zawodnikow bedzie skakac: \n");
- scanf("%d", &ilosc_zaw);
- printf("Podaj punkt K skocznii: \n");
- scanf("%d", &punkt_k);
- for(i=1; i <= ilosc_zaw; i++)
- {
- odleglosc= time(NULL);
- srand(odleglosc);
- printf("Zawodnik %d, skoczyl na %d odleglosc! \n", i, punkt_k+rand()/1700);
- }
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment