fork download
  1. #include<stdio.h>
  2. #include <time.h>
  3. #include <stdlib.h>
  4.  
  5. int aleatorio(){
  6. return rand() % 10 + 1;
  7. }
  8.  
  9. main(){
  10. srand(time(NULL));
  11. int numero1 = aleatorio();
  12. int numero2 = aleatorio();
  13. printf("%d %d",numero1, numero2);
  14. }
Success #stdin #stdout 0s 4532KB
stdin
Standard input is empty
stdout
8 4