📄 leap_year.cpp
字号:
#include <iostream>
using namespace std;
/*main information*/
void info()
{
cout << "leap year";//fill "*" with information
cout << endl << endl;
}
/*judge*/
bool leap(int year)
{
return (year % 4 == 0 && year % 100 != 0 || year % 400 == 0);
}
/*source code*/
void test()
{
//input code here......
int year = 2006;
if (leap(year))
{
cout << year << " is leap year.";
}
else
{
cout << year << " is not leap year.";
}
}
/*information of source code owner*/
void end()
{
cout << "\n\n\n______________\n";
cout << "xiao zhiqiang\n";
cout << "inxk@163.com\n";
cout << "Sep,2006";
getchar();
}
/*the main code*/
void main()
{
info();
test();
end();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -