Computer Science, asked by heyitsme67, 5 months ago

I need a c++ program to check wethere the given year is leap year or not (please tell fast friends)

Answers

Answered by mrtwister748
0

Answer:

#include <iostream> using namespace std; int main() { int year; cout << "Enter a year: "; cin >> year; if (year % 4 == 0) { if (year % 100 == 0) { if (year % 400 == 0) cout << year << " is a leap year."; else cout << year << " is not a leap year."; } else cout << year << " is a leap year."; } else cout << year << " is not a leap year."; return 0; }

Explanation:

Mark me as brainliest !

Similar questions