fork(1) download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <time.h>
  4.  
  5. int main(void) {
  6. int a, b;
  7. char ops[] = {'+', '-', '*'};
  8. char c;
  9.  
  10. srand(time(NULL));
  11. a = rand() % 100;
  12. b = rand() % 100;
  13. c = ops[rand() % 3];
  14.  
  15. printf("%d %c %d = ", a, c, b);
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0s 5312KB
stdin
Standard input is empty
stdout
86 + 89 =