博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
5_4学生类
阅读量:4364 次
发布时间:2019-06-07

本文共 729 字,大约阅读时间需要 2 分钟。

/** 程序的版权和版本声明部分* Copyright (c)2012, 烟台大学计算机学院学生* All rightsreserved.* 文件名称: object.cpp* 作者:纪子龙* 完成日期: 2013年3  月 21 日* 版本号: v1.0* 输入描述:无* 问题描述:无* 程序输出:无
*/#include 
using namespace std;class Student{private: long num; double score;public: void input(); void output();long max(Student *arr);};long Student::max(Student *arr){ int max=-1;for (int i=0; i<5;i++){ if(arr[i].score > max) max=arr[i].score;} for(i=0;i<5;i++) { if(max==arr[i].score) return arr[i].num; }}void Student::input(){ cout<<"please input student num and score"<
>num>>score;}void Student::output(){ cout<
<<" "<
<

转载于:https://www.cnblogs.com/xinyuyuanm/archive/2013/03/29/2988738.html

你可能感兴趣的文章
使用WebClient下载网页,用正则匹配需要的内容
查看>>
OC 获取IOS屏幕尺寸大小
查看>>
怎么在Linux上下载并安装ESET NOD32 Antivirus 4桌面版
查看>>
[Android_Exception]Checked 和 Runtime Exception区别
查看>>
Codeforces Round #476 (Div. 2) [Thanks, Telegram!] ABCDE
查看>>
java,eclipse中如何添加httpclient.jar
查看>>
清除浮动的几种方式
查看>>
基于Sql Server 2008的分布式数据库的实践(一)
查看>>
__module__ 和 __class__
查看>>
Object有哪些方法
查看>>
多线程程序写日志时遇到加锁的问题
查看>>
Tensorflow实战(二):Discuz验证码识别
查看>>
镜头覆盖范围FOV 的规划与FOV去四角
查看>>
NOI2015程序自动分析 并查集
查看>>
你知道什么是真正的勇敢?
查看>>
Splay入门题目 [HNOI2002]营业额统计
查看>>
总结day24 ---- socket ,struct 的学习
查看>>
vue 自学笔记记录
查看>>
js取指定范围随机值【原】
查看>>
关于CDH中开发Spark
查看>>