4.18
来源:互联网 发布:淘宝童学少年儿童家具 编辑:程序博客网 时间:2024/05/16 13:52
- #include<iostream>
- #include<cstdlib>
- using namespace std;
- class student{
- private:
- public:
- int number,math;
- void stu(int num,int m)
- {
- number=num;
- math=m;
- }
- };
- void max(student *p)
- {
- int i,j;
- student s[1];
- s[0].math=(*p).math;
- s[0].number=(*p).number;
- p++;
- for(j=0;j<6-1;j++)
- {
- if((*p).math>s[0].math)//数组元素大小按升序排列
- {
- s[0].math=(*p).math;
- s[0].number=(*p).number;
- p++;
- }
- }
- cout<<s[0].number<<" "<<s[0].math<<endl;
- }
- int main()
- {
- student stu[6];
- stu[0].stu(01,88);
- stu[1].stu(02,90);
- stu[2].stu(03,100);
- stu[3].stu(04,94);
- stu[4].stu(05,96);
- stu[5].stu(06,98);
- student *q;
- q=stu;
- max(q);
- system("pause");
- return 0;
- }
0 0
- 4.18
- 4.18
- 4.18
- 4.18
- 4.18
- 4.18
- 4.18
- 4.18
- 4.18
- 4.18
- 【4.18】
- 4.18
- 4.18
- 4.18
- 4.18
- 4.18
- Today 4.18
- 4.17 4.18
- IndexDB 使用问题
- 使用curl命令发送http请求
- TermServDevices错误的解决方案
- LeetCode || Integer to Roman
- ORACLE触发器详解
- 4.18
- iOS 调用相机拍照和选择图库图片 设置头像
- maven中的snapshot来源与注意事项
- iOS—复制字符串到剪切板
- Java Card Applet Development——环境搭建及基础概念
- CTO们接着吼:创业公司几乎全是坑!
- JDBC初探
- 冒泡排序——不同语言
- 变色服装不是梦,美大学开发出超薄反射型LCD