求大佬纠错
查看原帖
求大佬纠错
1189413
PURE_LOVE楼主2023/12/15 22:53

``c #pragma warning(disable:4996) #include<stdio.h> #include<malloc.h> #include<string.h> typedef struct { int number; int x; int y; int sum; int zhonghe; }cj; int main() { int n = 0; cj cjes[1100]; scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%d%d%d", &cjes[i].number, &cjes[i].x, &cjes[i].y); cjes[i].sum = cjes[i].x + cjes[i].y; cjes[i].zhonghe = cjes[i].x * 7 + cjes[i].y * 3;

}
for (int i = 0; i < n; i++)
{
    if (cjes[i].sum > 140 && cjes[i].zhonghe >= 800)
    {
        printf("Excelle\n");
    }
    else
    {
        printf("Not excellent\n");
    }
}

}

2023/12/15 22:53
加载中...