這個是對的嗎
#include <stdio.h>
int main()?
{
? ? int year = 2014; //今年是2014年
? ? //補全一下代碼
? ? if((year%4 ==0 && year%100 !=0) || year%400 == 0)
? ? {
? ? ? ? printf("%s\n","今年是閏年");
? ? }
? ? else
? ? {
? ? ? ? printf("%s\n","今年是平年");
? ? }
? ??
? ??
? ??
? ??
? ? return 0;
}
2021-01-04
運行試了一下,兩個printf后的標點出了問題,標點符號都應該用英文格式
2021-04-06
#include?<stdio.h>int?main()?{????int?year?=?2014;?//今年是2014年????//補全一下代碼????if((year%4==0&&year%100!=0)||year%400==0)?????{????????printf("今年是閏年");????}????????else????{????????printf("今年是平年");????}????????????????????return?0;}2021-01-04
對的耶
?