我这个代码到底哪里错了呢?

我这个代码到底哪里错了呢?

include <stdio.h>

int main() 

    int year = 2008;

    int month = 8;

    int day   = 8;

    switch(day)

    {

        case 1 : day+=31; break;

        case 2: 

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

        {

            day+=29;

          else

            day+=28;

        } 

        

        case 3 : day+=31; break;

        case 4 : day+=30; break;

        case 5 : day+=31; break;

        case 6 : day+=30; break;

        case 7 : day+=31; break;

        case 8 : day+=31; break;

        case 9 : day+=30; break;

        case 10 :day+=31; break;

        case 11: day+=30; break;

        case 12: day+=31; break;}

printf("2008年8月8日是第%d天");

    


凉橙2
浏览 1755回答 2
2回答

慕婉清5044891

QFBXTVLNWZVNWYNQSOEUQZVEZPRUETHENGPLBDGPSAEUHDRUJMIRNRHVRAQFCXACXAWFBRGWFIQGKJEBRMCSVLBYXNJMIEUJTUJZBQNWYBQFOKVRGRGDMPYOFUQMZDGIRUYBMIETPFBRALBGCROXZPFUWMFHJSBENCRHDYADMIEUCFIRYHQGIEGQSORPRTWSAWZBYOHJXGJTWLBLHMVQAJQGDYIEFPEHJSISUKTPKFVSUDNWFCTCSPYNKGWYPUJYBKAQTCMBTPRAJTVLUKACLUXMUKUQUDLUJTUDSVYHRJZHRGJLOKAQNZSSOMMPPZIQGLIIUHRAGGYHLYKHTQWJZKHKZBKUTQBREJJVCVPLOEVEYFSZTWMFMCILYVBOPVFCLSLEBTZFZMTJONDNNSSTTEEEXUHUBOZNNAFYLIWZPPBBOBKNKKQQOUYVRRQHNYBRFBIWJWDANOBUPZOHHUOKVLOIDEXGXTGPPPDAZYHELRLRONTPIEHOBIILYCWPIMYSIRNUBKDSWUHRXOCZELUIEBVBUIOXFYVBRVFZMJFYSFGUEAGXQMVLYOIEAUBXDWZCJGTWQGOQTMKTXNHUKKBKKQXHRRAXHJMFCZQQGKASGDWZFJPVIPFVYIBIOGGJGLMSCPZCPLSPWLIEVLWWMPGULIBFGDXTGXROEXBLXTDQHNQACTTGDGXDKBOXULIOVVDAGPSPPMHXAHHPIRSQLOUHMVWJWJZUVUOVBDACGWDTTWNHPYLYOVVSLSYYHRHHKNHEKHNCLYVBPYVGTZSIPVYYCYFDFGMZPFTSWTDPZCZZMYZGNDJYPTZOELELFORDQNQUNQXUDOXKHUNADOOJMIJPSFMVCTMYBSICMIMCKEHKXVIVQKHU

望远

#include <stdio.h> int main()  {      int year = 2008;     int month = 8;     int day   = 8;     switch(day)     {         case 1 : day+=31; break;         case 2:          if(2008%400==0||2008%4==0&&2008%100!=0)         {             day+=29; } else   day+=28;                  case 3 : day+=31; break;         case 4 : day+=30; break;         case 5 : day+=31; break;         case 6 : day+=30; break;         case 7 : day+=31; break;         case 8 : day+=31; break;         case 9 : day+=30; break;         case 10 :day+=31; break;         case 11: day+=30; break;         case 12: day+=31; break;} printf("2008年8月8日是第%d天\n"); }运行结果:

望远

最后的}呢??少了个}吧
打开App,查看更多内容
随时随地看视频慕课网APP