fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. struct Punkt {
  4. int x;
  5. int y;
  6. int z;
  7. char nazwa;
  8. };
  9. int main()
  10. {
  11. int i;
  12. srand(time(0));
  13. struct Punkt losowe[10];
  14. for (i = 0; i<10; i++)
  15. {
  16. losowe[i].x = rand() % 100;
  17. losowe[i].y = rand() % 100;
  18. losowe[i].z = rand() % 100;
  19. // tutaj jeszcze podaj nazwÄ™
  20. }
  21.  
  22. for (i = 0; i < 10; ++i)
  23. {
  24. printf("%d %d %d\n", losowe[i].x, losowe[i].y, losowe[i].z);
  25. }
  26.  
  27. return 0;
  28. }
Success #stdin #stdout 0s 4532KB
stdin
Standard input is empty
stdout
52 88 55
23 31 69
59 5 72
22 89 40
30 48 61
64 47 58
3 14 72
69 85 89
20 42 37
32 53 23