fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main(){
  4. int month;
  5. printf(" please enter number: ");
  6. scanf ("%d",&month);
  7.  
  8. switch(month){
  9. case 1: printf("jan");
  10. break;
  11. case 2: printf("Feb");
  12. break;
  13. case 3: printf("mar");
  14. break;
  15. case 4: printf("Apr");
  16. break;
  17. case 5: printf("may");
  18. break;
  19. case 6: printf("jun");
  20. break;
  21. case 7: printf("jul");
  22. break;
  23. case 8: printf("Aug");
  24. break;
  25. case 9: printf("sep");
  26. break;
  27. case 10: printf("oct");
  28. break;
  29. case 11: printf("Nov");
  30. break;
  31. case 12: printf("Dec");
  32. break;
  33. default:
  34. printf("please enter number between 1-12" );
  35. }
  36.  
  37.  
  38. return 0;
  39. }
  40.  
Success #stdin #stdout 0.01s 5280KB
stdin
Standard input is empty
stdout
 please enter number: please enter number between 1-12