1--4同学成绩
来源:互联网 发布:淘宝左氏燕窝真假 编辑:程序博客网 时间:2024/04/30 01:51
/* *程序的版权和版本声明部分: *Copyright(c)2013,烟台大学计算机学院学生 *All rights reserved. *文件名称: *作者:纪丽娜 *完成日期:2014年2月27日 *版本号:v1.0 *对任务及求解方法的描述部分: *输入描述: name score1 score2 score3*问题描述:*程序输出: *问题分析: *算法设计: */ #include <iostream>#include <iomanip>using namespace std;const int n=5;struct student{ char num[15]; char name[15]; int score[4];}stu[n];int main(){ void print(student stu[]); int i,j; for(i=0;i<n;i++) { cout<<"input scores of student"<<i+1<<":"<<endl; cout<<"NO.:"; cin>>stu[i].num; cout<<"name:"; cin>>stu[i].name; for(j=0;j<3;j++) { cout<<"score"<<j+1<<":"; cin>>stu[i].score[j]; } cout<<endl; } print(stu); return 0;}void print(student stu[]){ int i,j; cout<<"NO. name score1 score2 score3"<<endl; for(i=0;i<n;i++) { cout<<stu[i].num<<" "<<setw(10)<<stu[i].name<<" "; for(j=0;j<3;j++) {cout<<setw(10)<<stu[i].score[j]<<" ";} cout<<endl; }}
0 0
- 1--4同学成绩
- 五个同学的平均成绩
- N位同学成绩累加
- 求5个同学的平均成绩
- 1038 统计同成绩的同学
- 查找平均成绩大于70的同学
- 输入五个同学的成绩,统计出最大成绩
- 求五位同学的三科总成绩及平均成绩
- 输出成绩最好和最差同学的成绩
- 输出各班各科成绩最高的同学?输出各科成绩最高的同学?
- 成绩差的同学为何大多当了老板?
- 统计10个同学语数外三门成绩的平均分。
- 成绩差的同学为何大多数当了老板?
- 用学号差找不及格同学的成绩
- 输入一个班30位同学的成绩,
- 统计各班成绩第一名的同学信息
- 参加超级表格四级考试的同学,快来查成绩!
- 暑期集训之统计同成绩同学的人数
- ubuntu 查看 是否安装 cmake
- 简单控件属性
- Surface研究报告
- powerdesigner的使用
- tomcat conf目录下web.xml、tomcat-users.xml、server.xml以及context.xml四个文件的作用
- 1--4同学成绩
- 秦九韶算法解多项式
- 【Eclipse AST】AST的创建
- php对文件操作
- HTML5 Geolocation(地理定位)用于定位用户的位置
- C语言经典算法100例-012-求素数
- 笔记1
- Linux 进程
- SystemServer研究报告