第4题
来源:互联网 发布:一个程序员的自我修养 编辑:程序博客网 时间:2024/05/01 13:10
#include<iostream>#include<string>using namespace std;class Student{private:int num;double mark;public:void setdata(){cin>>num;cin>>mark;}void display(){cout<<"num="<<num<<endl;cout<<"mark="<<mark<<endl;}};int main(){int i;Student *p;p=new Student[5];for(i=0;i<5;i++){cout<<"请输入学号和成绩"<<endl;p[i].setdata(); }for(i=0;i<5;i+=2){p[i].display();}return 0;}
0 0
- 第4章 第4题
- 第2章第4题
- 第2章 第4题
- 第3章 第4题
- 第4章 第1题
- 第4章 第2题
- 第4章 第3题
- 第4章 第5题
- 第4章 第6题
- 第4章 第7题
- 第5章第4题
- 第7章第4题
- 第7章 第4题
- 第10章第4题
- p27第4题
- 第一章第4题
- 第4题作业
- P51 第4题
- Jexus-5.6.3使用详解
- CART模型
- 机器学习算法(一)——关联规则Apriori算法及R语言实现方法
- gps 模块及导航测试案例网址
- 聊聊 iOS 开发
- 第4题
- 算术和关系运算符
- QT编写的数据转曲线工具
- 【STL】next_permutation的原理和使用
- SDOI2015 Round1总结
- centos 防火墙设置
- 卡方算法
- ARM工作模式
- UVALive 6843 Volume Control