Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int main()
- {
- const int daysInYear{ 365 };
- int days{ daysInYear };
- int year;
- std::cout << "Enter year number:\n";
- std::cin >> year;
- //days += year % 4 == 0;
- days = days + (((year % 400 == 0) or (year % 4) == 0) and ((year % 100) != 0));
- std::cout << "In " << year << " there are " << days << " days.\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement