卜安居旗下全流程祈福开运网
提前预知预测吉凶趋吉避凶

首页 运势

最好最全的万年历 万年历查询大全

作者:双子星座

发布时间:2023-01-22 14:40:59

更新时间:2023-01-22 14:54:17

最好最全的万年历最全面的万年历,万年历forMac是mac上最好用的万年历软件可以为您提供万年历查询、日历查询、公历农历转换、气预报、黄历宜忌、精彩资讯、日程记事、节日节气、生日提醒等实用功能。

万年历老黄历日历
一个万年历的C++实现代码
#include < iostream >
#include < iomanip >
using namespace std;
int FistDayofYear( int y);
int DaysofMonth( int m);
void PrintMonth( int m);
void PrintHead( int m);
bool LeapYear( int y);
int WeekDay,year;
void main()
{
INPUT:
cerr << " 请输入年份(>1): " ;
cin >> year;
WeekDay = FistDayofYear(year);
cout << " \n\n " << year << " 年\n " ;
cout << " ========================================================== " ;
for ( int a = 1 ;a < 13 ;a ++ )
PrintMonth(a);
cout << endl;
int r = 0 ,u = 0 ;
cout << " 继续打1,退出打0 : " ;
cin >> r;
if (r > u)
goto INPUT;
else
goto END;
END:;
}
void PrintMonth( int m)
{
PrintHead(m);
int day = DaysofMonth(m);
for ( int i = 1 ;i <= day;i ++ )
{
cout << setw( 5 ) << i;
WeekDay = (WeekDay + 1 ) % 7 ;
if (WeekDay == 0 )
{
cout << endl;
cout << setw( 5 ) << " " ;
}
}
}
void PrintHead( int m)
{
cout << " \n\n " << setw( 5 ) << m;
cout << " 月 日 一 二 三 四 五 六 \n " ;
cout << setw( 5 ) << " " ;
for ( int i = 0 ;i < WeekDay;i ++ )
cout << setw( 5 ) << " " ;
}
int DaysofMonth( int m)
{
switch (m)
{
case 1 :
case 3 :
case 5 :
case 7 :
case 8 :
case 10 :
case 12 : return 31 ;
case 4 :
case 6 :
case 9 :
case 11 : return 30 ;
case 2 : if (LeapYear(year)) return 29 ;
else return 28 ;
}
return 0 ;
}
bool LeapYear( int y)
{
return (y % 4 == 0 && y % 100 != 0 || y % 400 == 0 );
}
int FistDayofYear( int y)
{
long m;
m = y * 365 ;
for ( int i = 1 ;i < y;i ++ )
m += LeapYear(i);
return m %= 7 ;
}

请大家推荐一款好的免费的万年历软件

2049电子钟数码万年历客厅大气时尚挂钟led夜光家用壁挂钟表fenghou16
这里有从公元前4600年直到公元10000间近14000多年的绿色多功能免费万年历软件,很好用,只有2M大小。不仅可以查农历,还可以查回历、使用记事本功能、闹钟功能等等许多功能,最关键的,它是一款小巧的绿色软件,无需安装可直接使用。地址:
http://hi.baidu.com/%CB%AE%D6%F3%C4%BE%D3%E3%CA%AF/blog/item/1cd377fad94ddf829f514604.html