fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <time.h>
  4.  
  5. int main(void) {
  6. int s;
  7. srand((unsigned)time(NULL));
  8. s=rand();
  9. switch(s%10){
  10. case 0:
  11. printf("大吉");
  12. break;
  13. case 1:
  14. printf("中吉");
  15. break;
  16. case 2:
  17. printf("小吉");
  18. break;
  19. default:
  20. printf("吉");
  21. break;
  22. }
  23. return 0;
  24.  
  25. }
  26.  
Success #stdin #stdout 0s 5276KB
stdin
Standard input is empty
stdout
小吉