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

為了賬號安全,請及時綁定郵箱和手機立即綁定

我寫了個好麻煩的代碼,運行失敗找不到原因

#include <stdio.h>
int main()
{
??? /* 定義需要計算的日期 */
??? int year = 2008;
??? int month = 8;
??? int day = 8;
???? int result;
???? int temporary;
switch(year%4)
{
??? case 0:
??????? result+=1;
??????? if(month>2||month<8);
??????? {
???????????
??????????? if(month%2==0);
??????????? {
??????????????? result+=month/2*31+(month/2-1)*30+28;
??????????????? printf("result");
??????????? }
??????????? else
??????????? {
??????????????? result+=(month/2+1)*31+(month/2-1)30+28;
??????????????? printf("result");
??????????? }
??????? }
??????? else if(month<2||month>0)
??????? {
??????????? result+=31;
??????????? printf("result");
??????? }
??????? else if(month==2)
??????? {
??????????? result+=31+28;
???????????? printf("result");
??????? }
??????? else if(month>=8)
??????? {??
???????????
??????????? month-7=temporary;
???????????
??????????? result+=(month/2+1)*31+(month/2-1)30+28;
???????????
????????????? if(temporary%2==0)
?????????????? {
??????????????? result+=temporary/2*31+(temporary/2-1)*30+28;
???????????????? printf("result");
?????????????? }
?????????????? else
?????????????? {
??????????????? result+=(temporary/2+1)*31+(temporary/2-1)30+28;
???????????????? printf("result");
?????????????? }
??????? }
???
???
???
???
??? default:
??? printf("%s\n"," 我失敗了");

}

?return 0;
}


正在回答

2 回答

修改后

#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
int main()
{
??? /* 定義需要計算的日期 */
??? int year = 2008;
??? int month = 8;
??? int day = 8;
???? int result=0;
???? int temporary=0;
switch(year%4)
{
??? case 0:
??????? result+=1;
??????? if(month>2||month<8)
??????? {

??????????? if(month%2==0)
??????????? {
??????????????? result+=month/2*31+(month/2-1)*30+28+day;
??????????????? printf("%d",result);
??????????????? break;
??????????? }
??????????? else
??????????? {
??????????????? result+=(month/2+1)*31+(month/2-1)*30+28+day;
??????????????? printf("%d",result);
??????????????? break;
??????????? }
??????? }
??????? else if(month<2||month>0)
??????? {
??????????? result+=31+day;
??????????? printf("result");
??????????? break;
??????? }
??????? else if(month==2)
??????? {
??????????? result+=31+28+day;
???????????? printf("result");
???????????? break;
??????? }
??????? else if(month>=8)
??????? {
??????????? month-=7;
?????????? temporary=month;
?????????? month+=7;

??????????? result+=((month/2+1)*31+(month/2-1)*30+28)+day;

????????????? if(temporary%2==0)
?????????????? {
??????????????? result+=temporary/2*31+(temporary/2-1)*30+28+day;
???????????????? printf("result");
???????????????? break;
?????????????? }
?????????????? else
?????????????? {
??????????????? result+=(temporary/2+1)*31+(temporary/2-1)*30+28+day;
???????????????? printf("result");break;
?????????????? }
??????? }
??????? else
??????? {
??????? printf("%s\n","這里什么都沒有");
??????? }

??? default:
??? printf("%s\n"," 母雞啊");

}


?return 0;
}


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

#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
int main()
{
??? /* 定義需要計算的日期 */
??? int year = 2008;
??? int month = 8;
??? int day = 8;
???? int result=0;
???? int temporary=0;
switch(year%4)
{
??? case 0:
??????? result+=1;
??????? if(month>2||month<8)
??????? {

??????????? if(month%2==0)
??????????? {
??????????????? result+=month/2*31+(month/2-1)*30+28+day;
??????????????? printf("%d",result);
??????????????? break;
??????????? }
??????????? else
??????????? {
??????????????? result+=(month/2+1)*31+(month/2-1)*30+28+day;
??????????????? printf("%d",result);
??????????????? break;
??????????? }
??????? }
??????? else if(month<2||month>0)
??????? {
??????????? result+=31+day;
??????????? printf("result");
??????????? break;
??????? }
??????? else if(month==2)
??????? {
??????????? result+=31+28+day;
???????????? printf("result");
???????????? break;
??????? }
??????? else if(month>=8)
??????? {
??????????? month-=7;
?????????? temporary=month;
?????????? month+=7;

??????????? result+=((month/2+1)*31+(month/2-1)*30+28)+day;

????????????? if(temporary%2==0)
?????????????? {
??????????????? result+=temporary/2*31+(temporary/2-1)*30+28+day;
???????????????? printf("result");
???????????????? break;
?????????????? }
?????????????? else
?????????????? {
??????????????? result+=(temporary/2+1)*31+(temporary/2-1)*30+28+day;
???????????????? printf("result");break;
?????????????? }
??????? }
??????? else
??????? {
??????? printf("%s\n","這里什么都沒有");
??????? }

??? default:
??? printf("%s\n"," 母雞啊");

}


?return 0;
}


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

舉報

0/150
提交
取消

我寫了個好麻煩的代碼,運行失敗找不到原因

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

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

幫助反饋 APP下載

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

公眾號

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