<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                直接上代碼,mark一下:嘿嘿 ~~~ #include <stdio.h> /** * 記錄并統計一個班的學生的成績來 * 練習一維數組的使用 */ int main(void) { int count; printf("How many students are in your class?\n"); scanf("%d",&count); //獲取班級中學生的數量 /** * 我在書中看的說是不允許變量賦值來這,但是 * 在我的嘗試中是可以的,不知道怎么回事。 */ int numbers[count],chinese[count],maths[count],eng[count]; puts("Please input the StudentID and three scores:\n"); printf(" studentID Chinese Math English\n"); int i = 0; /** * 接受用戶的成績輸入 */ for(i = 0;i < count;i++){ printf("No.%d>",i+1); scanf("%d %d %d %d",&numbers[i],&chinese[i],&maths[i],&eng[i]); } /** * 輸入完畢之后,輸出用戶的成績及其平均成績 */ printf("ID CH MA EN AVE\n"); printf("--------------------------\n"); int j; for(j = 0;j < count;j++){ float ave = (chinese[j] + maths[j] + eng[j])/3; //求出平均成績 printf("%d\t%d\t%d\t%d\t%f\n",numbers[j],chinese[j],maths[j],eng[j],ave); } /** * 循環求出各科的總成績 */ float ave_chinese = 0,ave_math= 0 ,ave_english = 0; int m; for(m = 0;m < count;m++){ ave_chinese += chinese[m]; ave_math += maths[m]; ave_english += eng[m]; } //輸出平均成績 printf("The Average of Chinese in this class is %f\n",ave_chinese/count); printf("The Average of math in this class is %f\n",ave_math/count); printf("The Average of english in this class is %f\n",ave_english/count); return 0; } ~~~ 下面是我的程序的運行結果: ![這里寫圖片描述](https://box.kancloud.cn/2016-05-24_5743c0748b873.jpg "")
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看