RakeshMgs

Leap Year or not

 

Leap Year

#include <stdio.h> int main() { int y; printf("Enter year: "); scanf("%d",&y); if(y % 4 == 0) { //Nested if else if( y % 100 == 0) { if ( y % 400 == 0) printf("%d is a Leap Year", y); else printf("%d is not a Leap Year", y); } else printf("%d is a Leap Year", y ); } else printf("%d is not a Leap Year", y); return 0; }

output

Leap Year


आपको आर्टिकल कैसा लगा? अपनी राय अवश्य दें
Please don't Add spam links,
if you want backlinks from my blog contact me on rakeshmgs.in@gmail.com