fork(1) download
  1. #include <stdio.h>
  2. #include<stdlib.h>
  3.  
  4.  
  5.  
  6. int main() {
  7. int a;
  8. int guess;
  9. a = rand();
  10. printf("Now,you can type a number.");
  11. scanf("%d", &guess);
  12. if(guess>a){
  13. printf("Too big,please type again!");
  14. }
  15. else if(guess<a){
  16. printf("Too small,please type again!");
  17. }
  18. else{
  19. printf("Good,you are right!");
  20. }
  21. return 0;
  22.  
  23.  
  24. }
  25.  
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
Now,you can type a number.Too small,please type again!