Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int num;
- printf("Entre com o numero do mes :\n"); scanf("%d",&num);
- if (num == 2)
- {
- printf("Mes com 28 dias!\n");
- }
- else if (num%2 != 0)
- {
- printf("Mes com 31 dias!\n");
- }
- else if (num%2 == 0)
- {
- printf("Mes com 30 dias!\n");
- }
- else printf("Mes invalido!\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment