Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int ano, resto, resto2;
- printf("Informe o ano \n");
- scanf("%d",&ano);
- resto=ano%400;
- if (resto==0){
- printf("O ano informado é bissexto");}
- else{
- resto=ano/4;
- resto2=resto%100;
- if(resto2==1){
- printf("O ano informado é bissexto");}else
- {printf("O ano informado não é bissexto");
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement