1004. 成绩排名 (20)
来源:互联网 发布:2016淘宝客刷销量 编辑:程序博客网 时间:2024/06/06 06:36
学会使用结构体
#include<iostream>using namespace std;struct student_info{ char name[11]; char id[11]; int score;};int main(){ int n; cin >> n; int int_max = 0, int_min = 0; student_info *student = new student_info [n]; for (int i = 0; i < n; i++) { cin >> student[i].name >> student[i].id >> student[i].score; if (student[i].score>student[int_max].score) { int_max = i; } if (student[i].score<student[int_min].score) { int_min = i; } } cout << student[int_max].name << " " << student[int_max].id << endl; cout << student[int_min].name << " " << student[int_min].id ; system("pause"); return 0;}
0 0
- 1004. 成绩排名 (20){PAT}
- 1004. 成绩排名 (20)
- PAT 1004. 成绩排名 (20)
- 1004. 成绩排名 (20)
- PAT - 1004. 成绩排名 (20)
- 1004. 成绩排名 (20)
- [PAT]1004. 成绩排名 (20)
- 1004. 成绩排名 (20)
- 1004. 成绩排名 (20)
- 1004. 成绩排名 (20)
- 1004. 成绩排名 (20)
- 1004. 成绩排名 (20)
- 1004. 成绩排名 (20)
- 1004. 成绩排名 (20)
- 1004. 成绩排名 (20)
- 1004. 成绩排名 (20)
- 1004. 成绩排名 (20)
- 1004. 成绩排名 (20)
- Dubbo|Dubbox 源码解读略析
- java安全架构____java HMAC加密
- 50个很棒的python模块
- Android Studio如何导入第三方主题
- 在android 下支持ntfs-3g
- 1004. 成绩排名 (20)
- (Java学习笔记5.1)简单排序
- 尚硅谷java学习笔记——13.java反射机制
- 详解各类球面投影
- MAVEN安装配置
- 基于voidAR实现增强现实之初音未来
- iOS逆向之“修改微信运动步数”
- 图片解码播放器
- js几种实用的跨域方法和原理