C++ Program For Checking Leap Year Or Not
#include<iostream>
#include<stdlib.h>
using namespace std;
void main()
{
unsigned year;
cout << "Enter any year for check wheather its leap year or not:";
cin >> year;
if (year % 4 == 0)
cout << "Its a leap year"<<endl;
else
cout << "Its not a leap year"<<endl;
cout<<"-------------------------------------------------------------";
cout << "If you want to check again press 1 !\n";
int again;
cin >> again;
if (again == 1)
{
{
system("CLS");
main();
}
}
else
{
cout << "THANK YOU ^ - ^\n";
}
system("pause");
}
0 comments:
Post a Comment