trojanxem

Untitled

Mar 2nd, 2012
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.52 KB | None | 0 0
  1. #include<stdlib.h>
  2. #include<cstdio>
  3. #include<conio.h>
  4. #include<time.h>
  5. #include<math.h>
  6.  
  7. int main()
  8. {
  9.     int i, odleglosc, punkt_k, ilosc_zaw;
  10.     printf("Ilu zawodnikow bedzie skakac: \n");
  11.     scanf("%d", &ilosc_zaw);
  12.     printf("Podaj punkt K skocznii: \n");
  13.     scanf("%d", &punkt_k);
  14.     for(i=1; i <= ilosc_zaw; i++)
  15.     {
  16.              
  17.     odleglosc= time(500);
  18.     srand(odleglosc);
  19.     printf("Zawodnik %d, skoczyl na %d odleglosc! \n", i, punkt_k+rand()/120);
  20. }
  21. getch();
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment