免费毕业论文--万年历设计(一)信息工程毕业(5)
2013-06-13 01:23
导读:;"\n\t (1) 日 历 查 询 (2) 退 出 系 统"; cout"\n\t=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*="; cout"\n\t请 输 入 您 的 选 择:"; begin1: cincCmd; c=cin.rdstate(); while(c) {ci
;"\n\t (1) 日 历 查 询 (2) 退 出 系 统";
cout<<"\n\t=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=";
cout<<"\n\t请 输 入 您 的 选 择:";
begin1:
cin>>cCmd;
c=cin.rdstate();
while(c)
{cin.clear();cin.getline(buf,80);
cout<<"\n\t非法输入 !重新输入:";
cin>>cCmd;
c=cin.rdstate();}
if(cCmd!=1&&cCmd!=2)
{cout<<"\n\t错误选择,重新选择:";goto begin1;}
if(cCmd==2)
{
cout<<"\n\t\t 操作完毕,数据已保存到"<<sFile;
cout<<"\n\t=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=";
cout<<"\n\t 请按任意键退出系统!";
cout<<"\n\t=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*="<<endl;
return;
}
if(cCmd==1)
{
char cchoice;
do
{
cout<<"\n\t默认路径是:D:\\文件请输入存盘路径:";
cin>>sFile; cin.getline(buf,100);
cout<<"\t确认无误是"<<sFile<<"吗?是(Y)否(N):";
cin>>cchoice;
}while(cchoice!='y'&&cchoice!='Y');
cout<< "\t-----------------\n\t请输入公历年 ,月份(用空格格开):";
cin >>Year;cin>>Month;
SolarShow(Year,Month,sFile);
strat:
cout<<"\n\t===*=======*=======*=======*=======*=======*=======*===="; cout<<"\n\t (1)上一月 (3)上一年 (5)重新输入年月\n";
(科教范文网 lw.AsEac.com编辑整理)
cout<<"\n\t (2)下一月 (4)下一年 (6)返回上级菜单";
cout<<"\n\t===*=======*=======*=======*=======*=======*=======*===="; cout<<"\n\t请 输 入 您 的 选 择:";
cin>>cCmd;
c=cin.rdstate();
while(c)
{cin.clear();cin.getline(buf,80);
cout<<"\n\t非法输入 !重新输入:";
cin>>cCmd;
c=cin.rdstate();}
switch(cCmd)
{
case 3: { Year=Year-1;SolarShow(Year,Month,sFile);goto strat;}
case 1: { Month=Month-1;SolarShow(Year,Month,sFile);goto strat;}
case 4: { Year=Year+1;SolarShow(Year,Month,sFile);goto strat;}
case 2: { Month=Month+1;SolarShow(Year,Month,sFile);goto strat;}
case 5: {cout << "\n\t请输入公历年 ,月份(用空格格开):";
cin >>Year;cin>>Month;So