include<stdlib.h> main(){ intyear;scanf("%d",&year);while(year!=0){ if(year%4==0&&year%100!=0||year%400==0)printf("%d是闰年",year);elseprintf("%d不是闰年",year);system("pause");scanf("%d",&year);} } 加一个while循环即可,当输入年份不为0时,可继续输入,输入0...
printf("关闭按钮按不了了\n");system("pause");}/** * 隐藏关闭按钮 */#include <Windows.h>#include <stdio.h>void main(){HWND hwnd = GetConsoleWindow();LONG Style;//窗口风格Style = GetWindowLong(hwnd, GWL_STYLE); // 得到窗口风格 Style = Style & ~WS_CAPTION; //去掉标...
=0||year%400==0) printf("%d是闰年",year); elseprintf("%d不是闰年",year); system("pause"); scanf("%d",&year); } } 加一个while循环即可,当输入年份不为0时,可继续输入,输入0则结束 如果你想一直运行的话,加一个while(0)即可。满意请采纳 ...