#includeint year = 0;
int month = 0;
int day = 0;
int hour = 0;
int minute = 0;
int second = 0;
int main()
{
void inputdate(); /*输入年-月-日 时:分:秒*/
void nextsceond(); /*计算下一秒的时间*/
int leapyear(int year); /*判断是否为闰年*/
int daymonth(int month); /*返回每个月份对应的天数*/
inputdate();
leapyear(year);
daymonth(month);
nextsceond();
system("pause");
return 0;
}
/*函数inputdate()输入年-月-日 时:分:秒*/
void inputdate()
{
int loop;
for(loop = 0; loop < 3; loop++)
{
printf("请输入年-月-日 时:分:秒:");
scanf("%d-%d-%d %d:%d:%d", &year, &month, &day, &hour, &minute, &second);
if(month < 1 || month > 12)
{
本文发布于:2024-01-31 16:44:38,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170669068029942.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |