📄 yu13.cpp
字号:
#include<stdio.h>
main()
{int score[35],i=1,j,sum=0,k;
int English=0,Math=0,Computer=0;
while(1)
{printf("input %d 3scores",i);
for (j=1;j<4;j++)
{scanf("%d",&score[i][j]);
if (score[i][j]<0) goto pp;
sum+=score[i][j];
if (j==1) English+=score[i][j]
if (j==2) Math +=score[i][j]
if (j==3) Computer+=score[i][j]
}
score[i][4]
i++;
sum=0;
}
pp:putchar("\n");
printf("English Math Computer Average\n");
for (k=1;k<i;k++)
for (j=1;j<=4;j++)
printf("%d",score[i][j]);
putchar('\n');
}
printf("English=%d,Math=%d,Computer=%d",English,Math,Computer);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -