#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;}生成的時(shí)候沒問題,調(diào)試的時(shí)候,窗口一閃就沒了The program '[7312] Project3.exe' has exited with code 0 (0x0).這是vasual studio2015中的VC++,求大神告知
3 回答
已采納

流浪_老
TA貢獻(xiàn)71條經(jīng)驗(yàn) 獲得超14個(gè)贊
#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 關(guān)注
- 4097 瀏覽
添加回答
舉報(bào)
0/150
提交
取消