BAOZHENJ
2018-12-06 07:04 阅读 319

c++或c 中运行日历时出错

运行日历时日期显示错误,如图所示
可能有问题的代码: case 2 :
printf("Enter month and year (MM YYYY) : ");
scanf("%d %d",&date.mm,&date.yy);
system("cls");
while(ch!='q'){
printMonth(date.mm,date.yy,20,5);
ch = getch();
if(ch == 'n'){
increase_month(&date.mm,&date.yy);
system("cls");
printMonth(date.mm,date.yy,20,5);
}else if(ch == 'p'){
decrease_month(&date.mm,&date.yy);
system("cls");
printMonth(date.mm,date.yy,20,5);
}else if(ch == 's'){
showNote(date.mm);
system("cls");
}
}

图片说明

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

相关推荐