#include <stdio.h> int main(){ int year=2015; if ((year % 4 == 0 && year % 100) || (year % 400 == 0)) { printf("%s\n", "今年是闰年"); } else { printf("%s\n", "今年是平年"); } printf("Press any key to continue...\n"); return 0;}生成的时候没问题,调试的时候,窗口一闪就没了The program '[7312] Project3.exe' has exited with code 0 (0x0).这是vasual studio2015中的VC++,求大神告知
3 回答
已采纳
流浪_老
TA贡献71条经验 获得超14个赞
#include <stdio.h>
#include<stdlib.h>
int main()
{
int year=2015;
if ((year % 4 == 0 && year % 100) || (year % 400 == 0)) {
printf("%s\n", "今年是闰年");
}
else {
printf("%s\n", "今年是平年");
}
printf("Press any key to continue...\n");
system("pause");
return 0;
}
- 3 回答
- 0 关注
- 4040 浏览
添加回答
举报
0/150
提交
取消