个人作业
来源:互联网 发布:ubuntu 切换到命令行 编辑:程序博客网 时间:2024/05/21 19:50
#include<iostream>
#include<string.h>
using namespace std;
class Student
{
public:
Student(int x,int c):xuehao(x),chengji(c){}
int xuehao;
int chengji;
};
int Max(int b[5])
{
int max;
max=b[0];
for(int i=0;i<4;i++)
if(b[i+1]>max)
max=b[i+1];
cout<<"max="<<max<<endl;
}
int main()
{
Student a[5]={
Student(10,20),
Student(30,30),
Student(520,520),
Student(205,205),
Student(025,025)
};
int b[5];
b[0]=a[0].chengji;
b[1]=a[1].chengji;
b[2]=a[2].chengji;
b[3]=a[3].chengji;
b[4]=a[4].chengji;
Max(b);
}
#include<string.h>
using namespace std;
class Student
{
public:
Student(int x,int c):xuehao(x),chengji(c){}
int xuehao;
int chengji;
};
int Max(int b[5])
{
int max;
max=b[0];
for(int i=0;i<4;i++)
if(b[i+1]>max)
max=b[i+1];
cout<<"max="<<max<<endl;
}
int main()
{
Student a[5]={
Student(10,20),
Student(30,30),
Student(520,520),
Student(205,205),
Student(025,025)
};
int b[5];
b[0]=a[0].chengji;
b[1]=a[1].chengji;
b[2]=a[2].chengji;
b[3]=a[3].chengji;
b[4]=a[4].chengji;
Max(b);
}
0 0
- 个人作业
- 个人作业
- 个人作业
- 个人作业
- 个人作业
- 个人作业
- 个人作业
- 个人作业
- 个人作业
- 个人作业
- 个人作业
- 个人作业
- 个人作业
- 个人作业
- 个人作业
- 个人作业
- 个人作业
- 个人作业
- Eclipse中Android项目运行时出现Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log
- JAVA猜数字游戏(二分)
- 外观模式(三):抽象外观类,外观模式效果与适用场景
- 编译原理词法分析
- 解决layout graphic 无法显示的问题
- 个人作业
- HDU 1160 FatMouse's Speed
- 初识FishEye
- iOS代码获取所有控件View结构树存到XML查看
- 关于CUDA6.5中newdelete的解读
- [C++]LeetCode 2: Add Two Numbers(链表逆序加法)
- AsyncResult 类的使用
- 先行进位加法
- PyQt5 状态栏