当前位置: 首页 > news >正文

广州住建厅官方网站江门网站推广深圳公司

广州住建厅官方网站,江门网站推广深圳公司,互联网平台推广怎么做,如何推广营销一个项目某班有最多不超过30人#xff08;具体人数由键盘输入#xff09;参加某门课程的考试#xff0c;用一维数组作函数参数编程实现如下学生成绩管理#xff1a; #xff08;1#xff09;录入每个学生的学号和考试成绩#xff1b; #xff08;2#xff09;计算课程的总分…某班有最多不超过30人具体人数由键盘输入参加某门课程的考试用一维数组作函数参数编程实现如下学生成绩管理 1录入每个学生的学号和考试成绩 2计算课程的总分和平均分 3按成绩由高到低排出名次表 4按学号由小到大排出成绩表 5按学号查询学生排名及其考试成绩 6按优秀90~100、良好80~89、中等70~79、及格60~69、不及格0~595个类别统计每个类别的人数以及所占的百分比 7输出每个学生的学号、考试成绩。 #include iostream #include iomanip using namespace std; void input(int a[], float b[],int); void caculate(float a[],int); void sort_in_descending_order_by_score(int a[], float b[],int); void sort_in_ascending_order_by_number(int a[],float b[],int); void search(int a[],float b[],int); void statistic(float a[],int); int main() {int n;cout Input student number(n30):;cin n;int choice;int xvehao[30];float score[30];while (1){cout endl;cout Management for Students scores endl;cout 1.Input record endl;cout 2.Caculate total and average score of course endl;cout 3.Sort in descending order by score endl;cout 4.Sort in ascending order by number endl;cout 5.Search by number endl;cout 6.Statistic analysis endl;cout 7.List record endl;cout 0.Exit endl;cout Please Input your choice:;cin choice;if (choice 1)input(xvehao, score, n);else if (choice 2)caculate(score, n);else if (choice 3)sort_in_descending_order_by_score(xvehao, score, n);else if (choice 4)sort_in_ascending_order_by_number(xvehao, score, n);else if (choice 5)search(xvehao, score, n);else if (choice 6)statistic(score, n);else if (choice 7)sort_in_ascending_order_by_number(xvehao, score, n);else if (choice 0)break;else{cout Please input any number from 0 to 7!endl; continue;}}return 0; } void input(int a[], float b[],int n) {int i;cout Input students ID, name and score: endl;for (i 1; i n; i){cin a[i] b[i];}} void caculate(float a[], int n) {float sum0,aver;int i;for (i 1; i n; i){sum a[i];}aver sum / n;cout sum sum , aver fixed setprecision(2) aver;cout endl; } void sort_in_descending_order_by_score(int a[], float b[], int n) {int i, j,k;for (i 1; i n; i){k i;for (j i1; j n ; j){if (b[k] b[j])k j;}int x a[i], y b[i];a[i] a[k]; b[i] b[k];a[k] x; b[k] y;}for (i 1; i n; i){cout a[i] b[i] endl;} } void sort_in_ascending_order_by_number(int a[], float b[], int n) {int i, j,k;for (i 1; i n; i){k i;for (j i 1; j n; j){if (a[j] a[k])k j;}int x a[i], y b[i];a[i] a[k]; b[i] b[k];a[k] x; b[k] y;}for (i 1; i n; i){cout a[i] b[i] endl;} } void search(int a[], float b[], int n) {int number;cin number;int i,k;for (i 1; i n; i){if (a[i] number){cout a[i] b[i]endl;k 1;break;}else k 0;}if (k 0)cout Cant find this student!endl; } void statistic(float a[], int n) {int i;int A 0, B 0, C 0, D 0, E 0, F 0;for (i 1; i n; i){if (a[i] 100)A;else if (a[i] 90 a[i] 99)B;else if (a[i] 80 a[i] 89)C;else if (a[i] 70 a[i] 79)D;else if (a[i] 60 a[i] 69)E;else F;}cout 60 F fixedsetprecision(2) ((float)F / n) * 100 % endl;cout 60-69 E fixed setprecision(2) ((float)E / n) * 100 % endl;cout 70-79 D fixed setprecision(2) ((float)D / n) * 100 % endl;cout 80-89 C fixed setprecision(2) ((float)C / n) *100 %endl;cout 90-99 B fixed setprecision(2) ((float)B / n) * 100 % endl;cout 100 A fixed setprecision(2) ((float)A / n) * 100 % endl; }
http://www.hkea.cn/news/14420439/

相关文章:

  • 一家公司多个网站备案php网站支付宝接口
  • 代充网站怎么做湖南省交通建设质量监督站网站
  • 网站手机版模板免费下载公司网站制作的费用申请
  • php网站开发待遇网站域名的建立
  • 常州天启建设公司网站wordpress淘宝客主题使用说明
  • 房山石家庄网站建设淮安市建设局网站首页
  • 当当网网站建设策划书wordpress建站vip全站教程
  • 免费网站电视剧全免费的app那些网站可以做推广
  • 服装网站的建设与管理建行的官网网址是什么
  • 网页制作一个网站八个页面咋做创新的武进网站建设
  • 文化馆的网站怎么建设wordpress导出word
  • 苏州网站建设最佳方案码迷seo
  • 定制网站开发全屋定制装修加盟网
  • 免费网站统计代码中国人做跨电商有什么网站
  • 网站怎么建设教程东莞健康app下载
  • 响应式网站工具会展中心网站建设
  • 百度网站大全帝国网站管理系统视频教程
  • 东莞高端网站建设哪个好wordpress用七牛
  • 一流的句容网站建设小程序定制开发公司前十名
  • 申请网站空间是申请域名吗蚌埠网站建设蚌埠
  • 为什么访问外国网站速度慢找工程包工平台app
  • 做网站创业需要注册公司吗湘西州住房和城乡建设局网站
  • 房地产微网站模板深圳建网站公司
  • 网站安全注意哪些问题吗网站前台模板下载
  • 软件网站排名潍坊网站制作厂家
  • 外贸 网站设计公司网站的服务器
  • 寻找在山西运城专业做网站推广的峨眉山网站建设
  • 西昌城乡建设网站网站开发会员功能教程
  • 六盘水住房和城乡建设部网站网站建设120
  • 如何在网站页面做标注wordpress添加flash