博客
关于我
奖学金发放
阅读量: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/

    你可能感兴趣的文章
    Open××× for Linux搭建之二
    查看>>
    Open×××有线网络时使用正常,无线网络时使用报错的解决方案
    查看>>
    Operation not supported on read-only collection 的解决方法 - [Windows Phone开发技巧系列1]
    查看>>
    Operations Manager 2007 R2系列之仪表板(多)视图
    查看>>
    operator new 与 operator delete
    查看>>
    operator() error
    查看>>
    OPPO K3在哪里打开USB调试模式的完美方法
    查看>>
    Optional类:避免NullPointerException
    查看>>
    ORA-00932: inconsistent datatypes: expected - got NCLOB【ORA-00932: 数据类型不一致: 应为 -, 但却获得 NCLOB 】【解决办法】
    查看>>
    ORA-00942 表或视图不存在
    查看>>
    ORA-01795: 列表中的最大表达式数为 1000
    查看>>
    ORA-06575: 程序包或函数 NO_VM_DROP_PROC 处于无效状态
    查看>>
    ORA-08102的错误
    查看>>
    ora-12541:tns:no listener
    查看>>
    【docker知识】联合文件系统(unionFS)原理
    查看>>
    ORACEL学习--理解over()函数
    查看>>
    oracle 10g crs命令,Oracle 10g CRS安装问题解决一例
    查看>>
    oracle 10g的安装配置
    查看>>
    Oracle 11.2.0.4 x64 RAC修改public/private/vip/scan地址
    查看>>
    Oracle 11G INDEX FULL SCAN 和 INDEX FAST FULL SCAN 对比分析
    查看>>