Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Program to find if it is a leap year
- #include <iostream>
- int main() {
- int year;
- std::cout << "Enter year: \n";
- std::cin >> year;
- if (year %4== 0 && year%100!=0 || year%400 ==0 ){
- std::cout << year;
- std::cout << " is a LEAP year! \n";
- }
- else {
- std::cout << year;
- std::cout << " is not a leap year \n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement