第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請及時(shí)綁定郵箱和手機(jī)立即綁定

不知道哪里出錯(cuò)了,求解

#include <stdio.h>
int main()
{
??? /* 定義需要計(jì)算的日期 */
??? int year = 2008;
??? int month = 7;
??? int day = 8;
??? int total=0;
??? switch(month)
??? {
??????? case 1:total+=31;
??????? case 2:
??????? if(year%4==0&&year%100==0&&year%400!=0)
??????? {total+=29;}
??????? else{
??????? total+=28;
??????? }
??????? case 3:total+=31;
??????? case 4:total+=30;
??????? case 5:total+=31;
??????? case 6:total+=30;
??????? case 7:total+=31;
??????? case 8:total+=31;
??????? case 9:total+=30;
??????? case 10:total+=31;
??????? case 11:total+=30;
??????? case 12:total+=31;
??? }
???? total=total+day+1;
???? printf("%d年%d月%d日是該年的%d天",year,month,day,total);
?
?return 0;
}



請問哪里出了問題

正在回答

2 回答

最后輸出的total為什么要在加一個(gè)1呢

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

雨晴啊 提問者

算日子不是要加一天嗎
2018-08-27 回復(fù) 有任何疑惑可以回復(fù)我~

閏年判斷錯(cuò)了

if(year%400==0||year%100!=0&&year%4==0)

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

雨晴啊 提問者

改了后還是運(yùn)行失敗
2018-08-27 回復(fù) 有任何疑惑可以回復(fù)我~
#2

雨晴啊 提問者

我找出錯(cuò)誤了,有中文符號(hào),謝謝
2018-08-27 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

不知道哪里出錯(cuò)了,求解

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)