-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathleapYear189.cpp
More file actions
32 lines (30 loc) · 791 Bytes
/
leapYear189.cpp
File metadata and controls
32 lines (30 loc) · 791 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
Task-> Take an input && check Wheather the number is Leap year || Not.
1.Start
2.Take Year as input
3. Is (number%400) == 0
1.True->Leap Year..
2.False->not Leap Year..
4.Cout << " Leap Year !"
5.End
*/
#include <iostream>
using namespace std;
//Function that takes something && returns nothing.
int check(int year){
if(year%400 == 0) {
cout << year << "-" << "The Year is Leap-Year";
//return true;
}
else{
cout << year << "-" << "is not Leap-Year";
//return false;
}
}
int main()
{
int year,display;
cout << "Enter a year to check wheather it is Leap Year || Not..:";
cin >> year;
display = check(year);//Function Call..
}