3.5
来源:互联网 发布:多组数据的相关性分析 编辑:程序博客网 时间:2024/05/16 07:57
#include<iostream>
using namespace std;
class student{
private:
int num;
int c;
public:
friend int max(student *p);
student(int n,int m):num(n),c(m){}
}*p;
student s[5]={
student(1,57),
student(2,68),
student(3,78),
student(4,48),
student(5,76),
};
int max(student *p){
int max;
max=0;
for(int i=0;i<5;i++)
if(max<p->c)
{ max=p->c;
p++;
}
return max;
}
int main(){
p=s;
cout<<max(p);
return 0;
}
using namespace std;
class student{
private:
int num;
int c;
public:
friend int max(student *p);
student(int n,int m):num(n),c(m){}
}*p;
student s[5]={
student(1,57),
student(2,68),
student(3,78),
student(4,48),
student(5,76),
};
int max(student *p){
int max;
max=0;
for(int i=0;i<5;i++)
if(max<p->c)
{ max=p->c;
p++;
}
return max;
}
int main(){
p=s;
cout<<max(p);
return 0;
}
0 0
- 3.5
- 3.5
- 3.5
- 3.5
- 3.5
- 3.5
- 3.5
- 3.5
- 3.5
- 3.5
- 3.5
- 3.5
- 3.4 3.5
- TFT_LCD(3.5")
- hdu1.3.5
- javaSE 3.5
- TFT_LCD(3.5")
- CareerCup-3.5
- JNDI全面总结
- 关于javaee编码问题
- UIImage from ALAsset: getting the right orientation
- 黑马程序员 发布一个虚拟复印机的小程序
- jsp界面中文乱码的解释
- 3.5
- 临界区锁和互斥对象锁对比介绍
- 第三章第十四题倒序20150419
- 原始套接字之PING(3)
- JNDI学习总结(一)——JNDI数据源的配置
- 《数据结构(C语言版)》综述
- 初学《Linux内核如何装载和启动一个可执行程序》
- maven配置文件setting.xml字段注释
- MyBatis学习总结(一)——MyBatis快速入门