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

给公司做一个网站吗分类信息发布 wordpress

给公司做一个网站吗,分类信息发布 wordpress,重庆市建设工程信息网 最权威平台中项网,东华软件是外包公司吗某班有最多不超过30人(具体人数由键盘输入)参加某门课程的考试,参考前面章节的“学生成绩管理系统V1.0”,用一维数组和函数指针作函数参数编程实现如下菜单驱动的学生成绩管理系统,其中每位同学的学号和成绩等数据可以…

某班有最多不超过30人(具体人数由键盘输入)参加某门课程的考试,参考前面章节的学生成绩管理系统V1.0”,用一维数组和函数指针作函数参数编程实现如下菜单驱动的学生成绩管理系统,其中每位同学的学号和成绩等数据可以通过不同数组的同一下标来关联:

1)录入每个学生的学号和考试成绩;

2)计算课程的总分和平均分;

3)按成绩由高到低排出名次表;

4)按成绩由低到高排出名次表;

5)按学号由小到大排出成绩表;

6)按学号查询学生排名及其考试成绩;

7)按优秀(90~100)、良好(80~89)、中等(70~79)、及格(60~69)、不及格(0~595个类别,统计每个类别的人数以及所占的百分比;

8)输出每个学生的学号、考试成绩。

这里只用函数指针来做函数参数。

#include <iostream>
#include <iomanip>
using namespace std;
void input(int*, float*,int*);
void caculate(float*,int*);
void sort_in_descending_order_by_score(int*, float* ,int*);
void sort_in_ascending_order_by_score(int*, float*, int*);
void sort_in_ascending_order_by_number(int* ,float* ,int*);
void search(int* ,float* ,int*);
void statistic(float* ,int *);
int main()
{int n;cout << "Input student number(n<30):";cin >> n;int choice;int xvehao[30];float score[30];int* p1 = &n, * p2 = xvehao;float *p3 = score;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 score" << endl;cout << "5.Sort in ascending order by number" << endl;cout << "6.Search by number" << endl;cout << "7.Statistic analysis" << endl;cout << "8.List record" << endl;cout << "0.Exit" << endl;cout << "Please Input your choice:";cin >> choice;if (choice == 1)input(p2, p3, p1);else if (choice == 2)caculate(p3, p1);else if (choice == 3)sort_in_descending_order_by_score(p2, p3, p1);else if (choice == 4)sort_in_ascending_order_by_score(p2, p3, p1);else if (choice == 5)sort_in_ascending_order_by_number(p2, p3, p1);else if (choice == 6)search(p2, p3, p1);else if (choice == 7)statistic(p3, p1);else if (choice == 8)sort_in_ascending_order_by_number(p2, p3, p1);else if (choice == 0)break;else{cout << "Please input any number from 0 to 8!"<<endl; continue;}}return 0;
}
void input(int *p2, float *p3,int *p1)
{int i;cout << "Input student's ID, name and score:" << endl;for (i = 1; i <= *p1; i++){cin >> *(p2+i) >> *(p3+i);}}
void caculate(float *p3, int *p1)
{float sum=0,aver;int i;for (i = 1; i <= *p1; i++){sum += *(p3+i);}aver = sum / *p1;cout << "sum=" << sum << " , aver=" << fixed << setprecision(2) << aver;cout << endl;
}
void sort_in_descending_order_by_score(int *p2, float *p3, int *p1)
{int i, j,k;for (i = 1; i <= *p1; i++){k = i;for (j = i+1; j <= *p1 ; j++){if (*(p3+k) < *(p3+j))k = j;}int x = *(p2+i), y = *(p3+i);*(p2 + i) = *(p2 + k); *(p3 + i) = *(p3 + k);*(p2 + k) = x; *(p3 + k) = y;}for (i = 1; i <= *p1; i++){cout << *(p2+i) << " " << *(p3+i) << endl;}
}
void sort_in_ascending_order_by_score(int*p2, float*p3, int*p1)
{int i, j, k;for (i = 1; i <= *p1; i++){k = i;for (j = i + 1; j <= *p1; j++){if (*(p3 + k) > *(p3 + j))k = j;}int x = *(p2 + i), y = *(p3 + i);*(p2 + i) = *(p2 + k); *(p3 + i) = *(p3 + k);*(p2 + k) = x; *(p3 + k) = y;}for (i = 1; i <= *p1; i++){cout << *(p2 + i) << " " << *(p3 + i) << endl;}
}
void sort_in_ascending_order_by_number(int *p2, float *p3, int *p1)
{int i, j,k;for (i = 1; i <= *p1; i++){k = i;for (j = i + 1; j <= *p1; j++){if (*(p2+j) < *(p2+k))k = j;}int x = *(p2+i), y = *(p3+i);*(p2 + i) = *(p2 + k); *(p3 + i) = *(p3 + k);*(p2 + k) = x; *(p3 + k) = y;}for (i = 1; i <= *p1; i++){cout << *(p2 + i) << " " << *(p3 + i) << endl;}
}
void search(int *p2, float *p3, int *p1)
{int number;cin >> number;int i,k;for (i = 1; i <= *p1; i++){if (*(p2+i) == number){cout << *(p2 + i) << " " << *(p3 + i) <<endl;k = 1;break;}else k = 0;}if (k == 0)cout << "Can't find this student!"<<endl;
}
void statistic(float *p3, int *p1)
{int i;int A = 0, B = 0, C = 0, D = 0, E = 0, F = 0;for (i = 1; i <= *p1; i++){if (*(p3+i) == 100)A++;else if (*(p3 + i) >= 90 && *(p3 + i) <= 99)B++;else if (*(p3 + i) >= 80 && *(p3 + i) <= 89)C++;else if (*(p3 + i) >= 70 && *(p3 + i) <= 79)D++;else if (*(p3 + i) >= 60 && *(p3 + i) <= 69)E++;else F++;}cout << "<60 "  << F<< " " <<fixed<<setprecision(2)<< ((float)F / *p1) * 100 << "%" << endl;cout << "60-69 "  << E<< " " << fixed << setprecision(2) << ((float)E / *p1) * 100 << "%" << endl;cout << "70-79 "  << D<< " " << fixed << setprecision(2) << ((float)D / *p1) * 100 << "%" << endl;cout << "80-89 "  << C<< " " << fixed << setprecision(2) << ((float)C / *p1) *100<< "%"<<endl;cout << "90-99 "  << B<< " " << fixed << setprecision(2) << ((float)B / *p1) * 100 << "%" << endl;cout << "100 "  << A<< " " << fixed << setprecision(2) << ((float)A / *p1) * 100 << "%" << endl;
}

http://www.yayakq.cn/news/781838/

相关文章:

  • 福州台江区网站建设贵阳大数据论坛
  • wordpress设置系统邮箱网站seo诊断分析
  • 锡盟网站建设流量推广平台有哪些
  • 广州网站建设报价专业网页制作加盟
  • 求一个做门窗技术的网站白山市网站建设
  • 平湖市住房和城乡规划建设局网站初中毕业生怎么自考大专
  • 做杂志一般在哪个网站找感觉企业网站的建立
  • 企业网站建站源码加强网站微信公众号平台建设
  • 象山企业门户网站建设找公司做网站有什么好处
  • 受欢迎的江苏网站建设淮安做网站找哪家好
  • 广扬建设集团网站捕鱼网站怎么做
  • 网站名注册建设银行手机查询网站
  • 谁做响应式网站crm系统价格
  • 优秀设计网站点评网站图片地址怎么做的
  • 住房和城乡建设部网站安全分会管理咨询行业的理解
  • 天津滨海新区小程序网站建设手机网站快速排名 软件
  • 给公司制作网站吗智能建站工具
  • 怎让做淘宝网站高端品牌羽绒服前十名
  • 天津南开做网站网站关键词库怎么做有什么效果
  • 怎么给网站做spm西安市平台公司
  • 淘宝客网站根目录我要表白网站
  • 公司网站建设属于软件销售Wordpress网格插件
  • 网站论坛模板下载家具网站设计网站
  • 有哪些网站做生鲜到家桂林网站制作找志合网络公司
  • 影响网站排名的因素 权重建设摩托车官网报价
  • 河北建设厅网站初始密码官网模版源码
  • 电商网站开发平台有哪些网站 颜色标准
  • 企业网站制作比较好的怎么注册网站卖东西
  • 阿里云网站核验单seo推广具体做什么
  • 国外建设网站情况报告怎么管理购物网站