check the leap is or not a leap year in cpp

 // checked that year is leap or not 

#include<iostream>

using namespace std;

int main(){

    int year ;

    cout<<" enter your year "<<endl;

    cin>>year;

    if (year%4==0)

    cout<<"your year is leap year "<<endl;

    

    else

    cout<<"your year is not a leap year "<<endl;

    return 0;

}

Comments

Popular posts from this blog

250+ C Programs for Practice

FUNCTION OVERRIDING IN CPP