write a
program that inputs a year from user and decide given year is leap or not?
#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
int year;
cout<<"Please a enter Year:";
cin>>year;
if (year%4==0)
cout<<"\nIt's a leap Year:";
else
cout<<"\nNot a leap year";
getch();
}

If You Enjoyed This, Take 5 Seconds To Share It
0 Questions:
Post a Comment