Advertisement
aiNayan

3(viii)

Nov 3rd, 2020
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int a;
  5. printf("Enter the order of a Month: ");
  6. scanf("%d", &a);
  7. if (a == 1)
  8. printf("31 days in january");
  9. else if (a == 2)
  10. printf("28 days in february");
  11. else if (a == 3)
  12. printf("31 days in march");
  13. else if (a == 4)
  14. printf("30 days in april");
  15. else if (a == 5)
  16. printf("31 days in may");
  17. else if (a == 6)
  18. printf("30 days in june");
  19. else if (a == 7)
  20. printf("31 days in july");
  21. else if (a == 8)
  22. printf("31 days in august");
  23. else if (a == 9)
  24. printf("30 days in september");
  25. else if (a == 10)
  26. printf("31 days in october");
  27. else if (a == 11)
  28. printf("30 days in november");
  29. else if (a == 12)
  30. printf("31 days in december");
  31. else
  32. printf("Invaild value");
  33. return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement