国产亚洲精品福利在线无卡一,国产精久久一区二区三区,亚洲精品无码国模,精品久久久久久无码专区不卡

當(dāng)前位置: 首頁(yè) > news >正文

保定網(wǎng)站建設(shè)方法能打開(kāi)各種網(wǎng)站的瀏覽器下載

保定網(wǎng)站建設(shè)方法,能打開(kāi)各種網(wǎng)站的瀏覽器下載,c 做網(wǎng)站教程,水果電商運(yùn)營(yíng)方案某班有最多不超過(guò)30人(具體人數(shù)由鍵盤輸入)參加某門課程的考試,參考前面章節(jié)的“學(xué)生成績(jī)管理系統(tǒng)V1.0”,用一維數(shù)組和函數(shù)指針作函數(shù)參數(shù)編程實(shí)現(xiàn)如下菜單驅(qū)動(dòng)的學(xué)生成績(jī)管理系統(tǒng),其中每位同學(xué)的學(xué)號(hào)和成績(jī)等數(shù)據(jù)可以…

某班有最多不超過(guò)30人(具體人數(shù)由鍵盤輸入)參加某門課程的考試,參考前面章節(jié)的學(xué)生成績(jī)管理系統(tǒng)V1.0”,用一維數(shù)組和函數(shù)指針作函數(shù)參數(shù)編程實(shí)現(xiàn)如下菜單驅(qū)動(dòng)的學(xué)生成績(jī)管理系統(tǒng),其中每位同學(xué)的學(xué)號(hào)和成績(jī)等數(shù)據(jù)可以通過(guò)不同數(shù)組的同一下標(biāo)來(lái)關(guān)聯(lián):

1)錄入每個(gè)學(xué)生的學(xué)號(hào)和考試成績(jī);

2)計(jì)算課程的總分和平均分;

3)按成績(jī)由高到低排出名次表;

4)按成績(jī)由低到高排出名次表;

5)按學(xué)號(hào)由小到大排出成績(jī)表;

6)按學(xué)號(hào)查詢學(xué)生排名及其考試成績(jī);

7)按優(yōu)秀(90~100)、良好(80~89)、中等(70~79)、及格(60~69)、不及格(0~595個(gè)類別,統(tǒng)計(jì)每個(gè)類別的人數(shù)以及所占的百分比;

8)輸出每個(gè)學(xué)生的學(xué)號(hào)、考試成績(jī)。

這里只用函數(shù)指針來(lái)做函數(shù)參數(shù)。

#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://m.aloenet.com.cn/news/35745.html

相關(guān)文章:

  • 軟件開(kāi)發(fā)過(guò)程五個(gè)步驟網(wǎng)站seo優(yōu)化總結(jié)
  • p2p網(wǎng)站建設(shè)百度seo發(fā)包工具
  • 豬八戒做網(wǎng)站靠譜嗎seo技術(shù)培訓(xùn)寧波
  • 網(wǎng)站的音樂(lè)鏈接怎么做現(xiàn)在有什么技能培訓(xùn)班
  • 微信如何做積分商城網(wǎng)站煙臺(tái)seo
  • 中國(guó)男女直接做的視頻網(wǎng)站百度云盤
  • 動(dòng)漫做3d游戲下載網(wǎng)站河南seo關(guān)鍵詞排名優(yōu)化
  • 怎么自己制作網(wǎng)站網(wǎng)絡(luò)推廣優(yōu)化招聘
  • app開(kāi)發(fā)定制開(kāi)發(fā)合肥seo網(wǎng)站排名
  • 專業(yè)網(wǎng)站建設(shè)webmeng網(wǎng)絡(luò)營(yíng)銷工具和方法
  • 上海微信小程序網(wǎng)站建設(shè)活動(dòng)策劃方案詳細(xì)模板
  • 電子商城網(wǎng)站建設(shè)農(nóng)產(chǎn)品推廣方案
  • 杭州開(kāi)發(fā)網(wǎng)站收錄網(wǎng)站
  • 坪山住房和建設(shè)局網(wǎng)站推銷
  • AAP網(wǎng)站開(kāi)發(fā)需要多少錢微指數(shù)
  • 西寧做網(wǎng)站的好公司北京seo優(yōu)化技術(shù)
  • 站群網(wǎng)絡(luò)促銷的方法有哪些
  • 成都網(wǎng)站建設(shè)前幾公司關(guān)鍵詞搜索愛(ài)站網(wǎng)
  • 自己做soho需要做網(wǎng)站嗎云盤網(wǎng)頁(yè)版登錄
  • 網(wǎng)絡(luò)推廣主要工作內(nèi)容網(wǎng)站關(guān)鍵詞排名優(yōu)化軟件
  • 網(wǎng)站測(cè)試問(wèn)題提交模板百度搜索引擎地址
  • 金融做市場(chǎng)廣告掛哪些網(wǎng)站seo百度網(wǎng)站排名研究中心關(guān)鍵詞首頁(yè)優(yōu)化
  • dedecms做網(wǎng)站有多快網(wǎng)絡(luò)營(yíng)銷推廣專員
  • 太原推廣型網(wǎng)站制作汕頭seo快速排名
  • 房山網(wǎng)站建設(shè)網(wǎng)絡(luò)seo哈爾濱
  • 政府網(wǎng)站建設(shè)分析專注于seo顧問(wèn)
  • 如何進(jìn)行網(wǎng)站維護(hù)seo云優(yōu)化如何
  • 動(dòng)態(tài)網(wǎng)站設(shè)計(jì)與開(kāi)發(fā)心得體會(huì)貴陽(yáng)關(guān)鍵詞優(yōu)化平臺(tái)
  • 齊諾網(wǎng)站建設(shè)成都私人做網(wǎng)站建設(shè)
  • 好域名做網(wǎng)站微信視頻號(hào)怎么推廣引流