Advertisement
TaniaTanni

Leap Year

Oct 23rd, 2019
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.24 KB | None | 0 0
  1. #include <stdio.h>
  2. void main()
  3. {
  4. int year;
  5. printf ("Insert the year:|n");
  6. scanf ("%d",&year);
  7. if(((year%4==0)&& (year%100!=0))|| (year %400==0))
  8. printf ("this is a leap year\n");
  9. else
  10. printf ("this is not a leap year");
  11. return 0;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement