Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // apple Xcode
- // paulogp
- #include <stdio.h>
- #define macro_bissexto(the_x) ((the_x) % 4 == 0 && (the_x) % 100 != 0 || (the_x) % 400 == 0)
- int main (int argc, const char * argv[]) {
- /* ano bissexto
- retorna 1 se sim, 0 se nao */
- int the_year = 0;
- printf("ano: ");
- scanf("%i", &the_year);
- int the_result = macro_bissexto(the_year);
- if (the_result == 1) {
- printf("Bissexto\n");
- } else {
- printf("Nao e bissexto\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement