/
githubmirror
/
CPlusPlusThings
Обзор
Документация
Войти
/
githubmirror
/
CPlusPlusThings
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
practical_exercises/10_day_practice/day1/runnian.cpp
17 строк
409 B
zhangxing
support bazel complie this project and format code.
30 мар 2024, 17:00
30 мар 2024, 17:00
3c8a3f2
Код
Авторство
О чём код?
/* 是否闰年.cpp */ #include <iostream> using namespace std; int main(int argc, char const *argv[]) { int year; bool isLeapYear; cout << "Enter the year: "; cin >> year; isLeapYear = (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)); if (isLeapYear) { cout << year << " is a leap year" << endl; } else { cout << year << " is not a leap year" << endl; } return 0; }