博客
关于我
奖学金发放
阅读量:200 次
发布时间:2019-02-28

本文共 1864 字,大约阅读时间需要 6 分钟。

Mooc????? ? ?????????

?????C????????????????????????? ????????? ??????????? ????????? ?????????????????? ????????????? qwq ???????? ??????????hhh ~~

#include 
#define len 10typedef struct winners { char name[20]; int finalScore; int classScore; char work; char west; int paper; int scholarship;} WIN;void Addup(WIN stu[], int n);int main() { int i; WIN stu[len]; printf("Input n:\n"); scanf("%d", &i); Addup(stu, i);}void Addup(WIN stu[], int n) { int i, sum = 0, m = 0, max = 0; for (i = 0; i <= n - 1; i++) { sum = 0; printf("Input name:\n"); scanf("%s", stu[i].name); printf("Input final score:\n"); scanf("%d", &stu[i].finalScore); printf("Input class score:\n"); scanf("%d", &stu[i].classScore); getchar(); printf("Class cadre or not?(Y/N):\n"); scanf("%c", &stu[i].work); getchar(); printf("Students from the West or not?(Y/N):\n"); scanf("%c", &stu[i].west); printf("Input the number of published papers:\n"); scanf("%d", &stu[i].paper); if (stu[i].finalScore > 80 && stu[i].paper > 0) sum += 8000; if (stu[i].finalScore > 85 && stu[i].classScore > 80) sum += 4000; if (stu[i].finalScore > 90) sum += 2000; if (stu[i].finalScore > 85 && stu[i].west == 'Y') sum += 1000; if (stu[i].finalScore > 80 && stu[i].work == 'Y') sum += 850; if (sum > max) { max = sum; m = i; } printf("name:%s,scholarship:%d\n", stu[i].name, sum); } printf("%s get the highest scholarship %d\n", stu[m].name, max);}

?????

  • ??????????????AI?????
  • ???????div??
  • ?????????????
  • ????????????????????
  • ????????????
  • ??????????
  • ????????????????????????
  • ??????????
  • ????????
  • ???????????
  • 转载地址:http://uxji.baihongyu.com/

    你可能感兴趣的文章
    NullPointerException Cannot invoke setSkipOutputConversion(boolean) because functionToInvoke is null
    查看>>
    Numix Core 开源项目教程
    查看>>
    NumPy 或 Pandas:将数组类型保持为整数,同时具有 NaN 值
    查看>>
    numpy 数组 dtype 在 Windows 10 64 位机器中默认为 int32
    查看>>
    numpy 数组与矩阵的乘法理解
    查看>>
    numpy 用法
    查看>>
    Numpy 科学计算库详解
    查看>>
    Numpy.ndarray对象不可调用
    查看>>
    Numpy如何使用np.umprod重写range函数中i的python
    查看>>
    numpy数组索引-ChatGPT4o作答
    查看>>
    numpy转PIL 报错TypeError: Cannot handle this data type
    查看>>
    NUUO网络视频录像机 css_parser.php 任意文件读取漏洞复现
    查看>>
    oauth2-shiro 添加 redis 实现版本
    查看>>
    OAuth2.0_JWT令牌-生成令牌和校验令牌_Spring Security OAuth2.0认证授权---springcloud工作笔记148
    查看>>
    OAuth2.0_JWT令牌介绍_Spring Security OAuth2.0认证授权---springcloud工作笔记147
    查看>>
    OAuth2.0_介绍_Spring Security OAuth2.0认证授权---springcloud工作笔记137
    查看>>
    OAuth2.0_完善环境配置_把资源微服务客户端信息_授权码存入到数据库_Spring Security OAuth2.0认证授权---springcloud工作笔记149
    查看>>
    OAuth2.0_授权服务配置_Spring Security OAuth2.0认证授权---springcloud工作笔记140
    查看>>
    OAuth2.0_授权服务配置_令牌服务和令牌端点配置_Spring Security OAuth2.0认证授权---springcloud工作笔记143
    查看>>
    OAuth2.0_授权服务配置_客户端详情配置_Spring Security OAuth2.0认证授权---springcloud工作笔记142
    查看>>