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

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

error C2196: case 值“1”已使用 ====了

error C2196: case 值“1”已使用 ====了

C
慕粉18341035298 2016-07-01 15:36:50
#include <stdafx.h>int main(){?int year = 2008, month = 8, day = 8, b = 0;?for (; 1 <= month; month--)?{??switch (month)??{??case 1 || 3 || 5 || 7 || 8 || 10 || 12:???b = b + 31;???break;??case 2:???if (year % 4 == 0 && year % 100 !=0 || year % 400 == 0)????b = b + 29;???else????b = b + 28;???break;??case 4||6||9||11:????b = b + 30;????break;??}?}?printf("%d", b + day);?return 0;}
查看完整描述

1 回答

已采納
?
OuBa

TA貢獻(xiàn)6條經(jīng)驗 獲得超5個贊

#include?<stdafx.h>
int?main()
{
????int?year?=?2008;
????int?month?=?8;?
????int?day?=?8;
????int?b?=?0;
????
????for?(;?1?<=?month;?month--)
????{
????????switch?(month)
????????{
?????????????case?1:
?????????????case?3:
?????????????case?5:
?????????????case?7:
?????????????case?8:
?????????????case?10:
?????????????case?12:
?????????????{
?????????????????b?=?b?+?31;
?????????????????break;
?????????????}
?????????????case?2:
?????????????{
??????????????????if?(year?%?4?==?0?&&?year?%?100?!=0?||?year?%?400?==?0)
??????????????????{
??????????????????????b?=?b?+?29;
??????????????????}?
??????????????????else
??????????????????{
??????????????????????b?=?b?+?28;
??????????????????}
??????????????????break;
?????????????}
?????????????case?4:
?????????????case?6:
?????????????case?9:
?????????????case?11:
?????????????{
??????????????????b?=?b?+?30;
??????????????????break;
?????????????}
?????????}
?????}
?????printf("%d\n",?b?+?day);
?????return?0;
}


查看完整回答
反對 回復(fù) 2016-07-01
  • 1 回答
  • 0 關(guān)注
  • 1958 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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