Advertisement
sanpai

Check for leap Year

Aug 13th, 2012
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1.  
  2.  
  3.  
  4. #include<stdio.h>
  5. int main()
  6.  
  7. {
  8.  
  9. int year;
  10. printf("\n enter the year from the keyboard ");
  11. scanf("%d ", &year);
  12. if(year%4 == 0)
  13. printf("\n %d is a leap year ",year );
  14. else
  15. printf("\n %d is not a leap year ", year);
  16.  
  17. }
  18.  
  19.  
  20. ~
  21. ~
  22. ~
  23. ~
  24. ~
  25. ~
  26. ~
  27. "year.c" 16L, 242C 1,1 All
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement