請(qǐng)問(wèn)這段代碼哪兒有問(wèn)題
#include <stdio.h>
int main(){
? ? int year = 2008;
? ? int month = 8;
? ? int day = 8;
? ? int count;
? ? if((year%4==0&&year%100!=0)||year%400==0){
? ? ? ? count = 4*31+2*30+29+8;
? ? ? ? printf("2018年8月8日是該年的第%d天",count);
? ? }else{
? ? ? ? count = 4*31+3*30+8;
? ? ? ? printf("2018年8月8日是該年的第%d天",count);
? ? }
}
2017-12-13
#include <stdio.h>
int main(){
?int year = 2008;
?int month = 8;
int day = 8;
int count;
if((year%4==0&&year%100!=0)||year%400==0){
?count = 4*31+2*30+29+8;
printf("2018年8月8日是該年的第%d天",count);
}else{
?count = 4*31+3*30+8;
printf("2018年8月8日是該年的第%d天",count);
}
}加粗的斜體的下劃線處的逗號(hào)要用英文的,別的地方?jīng)]有錯(cuò)
2022-03-26
如果不加會(huì)怎么樣呢噓...低調(diào)...好好干著,等你創(chuàng)業(yè)的時(shí)候叫著我哈,^_^...
2018-03-03
你認(rèn)為非閏年的2月是30天?如果是的話那你錯(cuò)了
2017-12-13
格式不規(guī)范,另外,8、9還有11、12個(gè)別符號(hào)是中文輸入法輸入的
2017-12-13
錯(cuò)了很多,一看就和我一樣,初學(xué)者,哈哈