xin

物联网205 陈腾 发表于2020年12月10日
<p>#include&lt;stdio.h&gt;</p><p><br ></p><p>#include&lt;string.h&gt;</p><p><br ></p><p>#define N 5</p><p>#define M 5&nbsp;</p><p>#define x 5</p><p><br ></p><p>void displayexamsheet(){</p><p> double s[5][5]={</p><p> &nbsp; {78,82,83,74,65},</p><p> &nbsp; &nbsp; &nbsp; {91,82,72,76,67,},</p><p> &nbsp; &nbsp; &nbsp; {100,99,85,72,56},</p><p> &nbsp; &nbsp; &nbsp; {100,100,100,100,11},</p><p> &nbsp; &nbsp; &nbsp; {99,45,58,49,45},</p><p> };</p><p> for(int i=0;i&lt;M;i++){</p><p> printf(&quot;%d&quot;,i+1);</p><p> for(int j=0;j&lt;X,j++){</p><p> printf(&quot;%.0f\t&quot;,s[i][j]);</p><p> }</p><p> printf(&quot;\n&quot;);</p><p> }</p><p><br ></p><p>}</p><p>int main(void){</p><p><br ></p><p> displayexamsheet();</p><p><br ></p><p> return 0;</p><p><br ></p><p>}</p><p><br ></p>
3 回复

    1楼

  • 物联网205 陈腾 发表于2020年12月10日
    0 | 0 | 举报
    <p>#include&lt;stdio.h&gt;</p><p><br ></p><p><br ></p><p><br ></p><p>#include&lt;string.h&gt;</p><p><br ></p><p><br ></p><p><br ></p><p>#define N 5</p><p><br ></p><p>#define M 5&nbsp;</p><p><br ></p><p>#define X 5</p><p><br ></p><p><br ></p><p><br ></p><p>void displayexamsheet(){</p><p><br ></p><p> double s[M][X]={</p><p><br ></p><p> &nbsp; {78,82,83,74,65},</p><p><br ></p><p> &nbsp; &nbsp; &nbsp; {91,82,72,76,67,},</p><p><br ></p><p> &nbsp; &nbsp; &nbsp; {100,99,85,72,56},</p><p><br ></p><p> &nbsp; &nbsp; &nbsp; {100,100,100,100,100},</p><p><br ></p><p> &nbsp; &nbsp; &nbsp; {99,45,58,49,45},</p><p><br ></p><p> };</p><p> printf(&quot;学号\t语文\t数学\t英语\t物理\t生物\n&quot;);</p><p> printf(&quot;------------------------------------------------\n&quot;);</p><p><br ></p><p> for(int i=0;i&lt;M;i++){</p><p><br ></p><p> printf(&quot;No.%d\t&quot;,i+1);</p><p><br ></p><p> for(int j=0;j&lt;X;j++){</p><p><br ></p><p> printf(&quot;%.0f\t&quot;,s[i][j]);</p><p><br ></p><p> }</p><p><br ></p><p> printf(&quot;\n&quot;);</p><p><br ></p><p> }</p><p><br ></p><p><br ></p><p><br ></p><p>}</p><p><br ></p><p>int main(void){</p><p><br ></p><p><br ></p><p><br ></p><p> displayexamsheet();</p><p><br ></p><p><br ></p><p><br ></p><p> return 0;</p><p><br ></p><p><br ></p><p><br ></p><p>}</p><p><br ></p>
    物联网205 陈腾 发表于2020年12月10日
    添加评论
  • 2楼

  • 物联网205 陈腾 发表于2020年12月10日
    0 | 0 | 举报
    <p>#include&lt;stdio.h&gt;</p><p>#include&lt;string.h&gt;</p><p>#define N 5</p><p>#define M 5&nbsp;</p><p>#define X 5</p><p>void displayexamsheet(){</p><p><br ></p><p> double s[M][X]={</p><p><br ></p><p> &nbsp; {111,160,105,74,65},</p><p><br ></p><p> &nbsp; &nbsp; &nbsp; {121,150,101,76,67,},</p><p><br ></p><p> &nbsp; &nbsp; &nbsp; {100,163,85,72,85},</p><p><br ></p><p> &nbsp; &nbsp; &nbsp; {100,150,100,100,71},</p><p><br ></p><p> &nbsp; &nbsp; &nbsp; {99,99,99,99,9},</p><p><br ></p><p> };</p><p> printf(&quot;\n&quot;);</p><p> printf(&quot;\t育才高级中学高三11班\n&quot;);</p><p> printf(&quot;学号\t语文\t数学\t英语\t生物\t物理\n&quot;);</p><p> printf(&quot;--------------------------------------------\n&quot;);</p><p><br ></p><p> for(int i=0;i&lt;M;i++){</p><p><br ></p><p> printf(&quot;%d\t&quot;,i+1);</p><p><br ></p><p> for(int j=0;j&lt;X;j++){</p><p><br ></p><p> printf(&quot;%.0f\t&quot;,s[i][j]);</p><p><br ></p><p> }</p><p><br ></p><p> printf(&quot;\n&quot;);</p><p><br ></p><p> }</p><p><br ></p><p><br ></p><p><br ></p><p>}</p><p><br ></p><p>int main(void){</p><p><br ></p><p><br ></p><p><br ></p><p> displayexamsheet();</p><p><br ></p><p><br ></p><p><br ></p><p> return 0;</p><p><br ></p><p><br ></p><p><br ></p><p>}</p><p><br ></p><p><br ></p><p><br ></p>
    物联网205 陈腾 发表于2020年12月10日
    添加评论
  • 3楼

  • 物联网205 陈腾 发表于2020年12月11日
    0 | 0 | 举报
    <p>#include&lt;stdio.h&gt;</p><p>#include&lt;stdlib.h&gt;</p><p>#include&lt;string.h&gt;</p><p><br ></p><p>#define N 5</p><p><br ></p><p>#define M 10&nbsp;</p><p><br ></p><p>#define X 7</p><p><br ></p><p>void displayexamsheet(){</p><p> double s[M][X]={</p><p> &nbsp; {111,160,105,74,65},</p><p> &nbsp; &nbsp; &nbsp; {101,150,101,76,67,},</p><p> &nbsp; &nbsp; &nbsp; {100,163,85,72,85},</p><p> &nbsp; &nbsp; &nbsp; {100,150,100,100,71},</p><p> &nbsp; &nbsp; &nbsp; {99,99,99,99,9},</p><p> };</p><p> printf(&quot;\t\t\txxx高级中学高三11班\n\n&quot;);</p><p> printf(&quot;学号\t语文\t数学\t英语\t生物\t物理\t总分\t平均分\n&quot;);</p><p> printf(&quot;---------------------------------------------------------------\n&quot;);</p><p> for(int i=0;i&lt;M;i++){</p><p> if(i&lt;5){</p><p> printf(&quot;%d\t&quot;,i+170501);</p><p> }else if(i==5){</p><p> printf(&quot;---------------------------------------------------------------\n&quot;);</p><p> printf(&quot;总分\t&quot;);</p><p> }else if(i==6){</p><p> printf(&quot;平均分\t&quot;);</p><p> }else if(i==7){</p><p> printf(&quot;最高分\t&quot;);</p><p> }else if(i==8){</p><p> printf(&quot;最低分\t&quot;);</p><p> }else if(i==9){</p><p> printf(&quot;MVP\t&quot;);</p><p> }</p><p> </p><p> for(int j=0;j&lt;X-2;j++){</p><p> s[i][5]+=s[i][j]; </p><p> if(i&lt;X-2){</p><p> </p><p> s[5][j]+=s[i][j];</p><p> s[6][j]+=s[i][j]/(X-2);</p><p> if(s[7][j]&lt;s[j][j]){</p><p> s[7][j]=s[i][j];</p><p> s[9][j]=i+1;</p><p> }</p><p> if(s[8][j]&gt;s[i][j]||i==0){</p><p> s[8][j]=s[i][j];</p><p> }</p><p> &nbsp; &nbsp; }</p><p> </p><p> printf(&quot;%.0f\t&quot;,s[i][j]);</p><p> }</p><p> s[i][6]=s[i][5]/(X-2);</p><p> printf(&quot;%.0lf\t%.0lf&quot;,s[i][5],s[i][6]);</p><p> printf(&quot;\n&quot;);</p><p><br ></p><p><br ></p><p><br ></p><p> }</p><p><br ></p><p><br ></p><p><br ></p><p><br ></p><p><br ></p><p><br ></p><p><br ></p><p>}</p><p><br ></p><p><br ></p><p><br ></p><p>int main(void){</p><p><br ></p><p><br ></p><p><br ></p><p><br ></p><p><br ></p><p><br ></p><p> system(&quot;color 12&quot;);</p><p> displayexamsheet();</p><p><br ></p><p><br ></p><p><br ></p><p><br ></p><p><br ></p><p><br ></p><p><br ></p><p> return 0;</p><p>}</p><p><br ></p>
    物联网205 陈腾 发表于2020年12月11日
    添加评论