Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- //////////////////////////////////////////////////////////////
- int main( void ) //
- {
- int a;
- printf("input number of month: "); scanf("%i", &a);
- if(a == 1 || a == 3 ||
- a == 5 || a == 7 ||
- a == 8 || a == 10 || a == 12) { printf( "31 days\n"); return 0; }
- if(a == 2) { printf("28/29 days\n"); return 0; }
- if(a < 1 || a > 12) { printf( "Mistake\n"); return 0; }
- printf( "30 days\n"); return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement