資源簡介
C++實戰源碼-判斷閏年(入門級實例200).zip
代碼片段和文件信息
//?runyear.cpp?:?Defines?the?entry?point?for?the?console?application.
//
#include?“stdafx.h“
#include?“iostream.h“
void?IsLeap(const?int?year)
{
char?*?mm?=??(year?%?4?==?0?&&?year?%?100?!=?0) //判斷是否為閏年
????????????||?year?%?400?==?0???“是閏年“:“不是閏年“;
cout?<
}
int?main(int?argc?char*?argv[])
{
int?year;
cin?>>?year;
IsLeap(year);
return?0;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????1214??2010-10-13?15:40??runyear\ReadMe.txt
?????文件?????????428??2010-12-04?13:21??runyear\runyear.cpp
?????文件????????4548??2010-10-13?15:40??runyear\runyear.dsp
?????文件?????????539??2010-10-13?15:40??runyear\runyear.dsw
?????文件???????50176??2010-12-04?13:24??runyear\runyear.ncb
?????文件???????53760??2010-12-04?13:24??runyear\runyear.opt
?????文件????????1327??2010-12-04?13:21??runyear\runyear.plg
?????文件?????????294??2010-10-13?15:40??runyear\StdAfx.cpp
?????文件?????????769??2010-10-13?15:40??runyear\StdAfx.h
- 上一篇:C++實戰源碼-使用結構體標識操作員名稱
- 下一篇:C++實戰源碼-判斷名次
評論
共有 條評論