trojanxem

Untitled

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