fork download
  1. /*switch01_*/
  2.  
  3. #include <stdio.h>
  4.  
  5. int main(void) {
  6. // your code goes here
  7. int Num;
  8.  
  9. printf("Input Number--");
  10. scanf("%d",&Num);
  11. printf("%d\n",Num);
  12.  
  13. printf("--------------------------\n");
  14.  
  15. switch(Num){
  16. case 1:
  17. printf("You input one\n");
  18. break;
  19. case 2:
  20. printf("You input two\n");
  21. break;
  22. case 3:
  23. printf("You input three\n");
  24. break;
  25. case 4:
  26. printf("You input four\n");
  27. break;
  28. default:
  29. printf("modify 1 to 4\n");
  30. }
  31.  
  32. printf("That is Finish \n");
  33. return 0;
  34. }
  35.  
Success #stdin #stdout 0s 5324KB
stdin
6
stdout
Input Number--6
--------------------------
modify 1 to 4
That is Finish