4.18
来源:互联网 发布:mac wifi不能上网 编辑:程序博客网 时间:2024/05/22 02:03
#include<iostream>using namespace std;class student{public:student(int a,int b){number=a;performance=b;}void display();void Max(student *p);private:int number;int performance;};void student::display(){ cout<<"成绩最高的学生的学号:"<<number<<endl; cout<<"成绩最高的学生的成绩:"<<performance<<endl<<endl;}void student::Max(student *k){int max;max=k->performance;for(int i=0;i<5;i++){student *q;k++;if(k->performance>max)max=k->performance;}for(int j=0;j<5;j++){if(k->performance=max)k->display;k++;}}int main(){student *p;student stu[6]={student(01,68),student(02,50),student(03,99),student(04,77),student(05,33),student(06,88)};p=stu;p->Max(p);p->display();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
- 数组越界溢出利用--改写对象虚函数表
- 线程与线程机制的实现
- Mac ssh locahost Connection refused
- POJ题目1265 Area(PICK定理)
- Ubtuntu 14.04 下通过 apt-get 安装 JDK 7.0
- 4.18
- 【练习】面向对象系列(001)——泳池
- action接收请求参数
- PreparedStatement和Statement区别
- 如何从零开始学习C#
- JS闭包学习笔记
- 学习mybatis 的一点心得
- 第六天面向对象
- leetcode : count and say