fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main() {
  5. int c, n;
  6.  
  7. printf("Ten random numbers in [1,100]\n");
  8.  
  9. for (c = 1; c <= 10; c++) {
  10. n = rand() % 100 + 1;
  11. printf("%d\n", n);
  12. }
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0s 2112KB
stdin
Standard input is empty
stdout
Ten random numbers in [1,100]
84
87
78
16
94
36
87
93
50
22