先介绍下背景吧,我们学校每年都有一次体育测试,这个很重要,四年如果没有一次及格(达到60分,总分100)的话,那就拿不到毕业证,如果及格了成绩达不到75,一切一切奖学金都拿不到,连参评的资格都没有,不管你的成绩是多么优秀,体测不到75,就一点希望也没有,唉,去年我的成绩可以说是不错,但是体测71分,所以。。。学生根据一张表可以自己计算自己的体测成绩,但是表的数据很多,查找起来有点麻烦,而且还得经过换算,所以我就想自己编个程序让计算机来帮我们计算分数,而我们只要简单的输入相关数据就可以了。

我就拿我的各项数据来做测试吧 。

代码如下:

#include <iostream>
using namespace std;bool flag;//判断性别
double height,weight,lv,run,hand,jump;//定义身高,体重,肺活量,跑步,握力,跳远
double sum,sumjump,sumrun,index_haw,index_lvw,standard_heiw;
//定义总成绩,立定跳远成绩,跑步成绩,握力体重指数成绩,肺活量体重指数成绩,身高标准体重成绩void input()
{int s;cout<<"男生请输入1 女生请输入2:  ";  cin>>s;if(s==1)flag=true;elseflag=false;cout<<endl;cout<<"请输入以下数据:"<<endl;cout<<"身高(cm): "; cin>>height;cout<<"体重(kg): "; cin>>weight;cout<<"肺活量(ml): "; cin>>lv;if(flag){cout<<"1000米成绩(s): "; cin>>run;}else{cout<<"800米成绩(s): "; cin>>run;}cout<<"握力(kg): "; cin>>hand;cout<<"跳远(cm): "; cin>>jump;
}
double m_ldty()//计算男生立定跳远成绩
{sumjump=0;if(jump>=266)sumjump=100;else if(jump>=265)sumjump=98;else if(jump>=263)sumjump=96;else if(jump>=262)sumjump=94;else if(jump>=260)sumjump=92;else if(jump>=258)sumjump=90;else if(jump>=256)sumjump=87;//else if(jump>=252)sumjump=84;else if(jump>=248)sumjump=81;else if(jump>=243)sumjump=78;else if(jump>=2.38)sumjump=75;else if(jump>=235)sumjump=72;else if(jump>=231)sumjump=69;else if(jump>=226)sumjump=66;else if(jump>=220)sumjump=63;else if(jump>=214)sumjump=60;else if(jump>=212)sumjump=50;else if(jump>=209)sumjump=40;else if(jump>=206)sumjump=30;else if(jump>=203)sumjump=20;elsesumjump=10;sumjump*=0.2;return sumjump;
}double f_ldty()//计算女生立定跳远成绩
{sumjump=0;if(jump>=207)sumjump=100;else if(jump>=206)sumjump=98;else if(jump>=205)sumjump=96;else if(jump>=203)sumjump=94;else if(jump>=201)sumjump=92;else if(jump>=199)sumjump=90;else if(jump>=197)sumjump=87;//else if(jump>=193)sumjump=84;else if(jump>=189)sumjump=81;else if(jump>=184)sumjump=78;else if(jump>=179)sumjump=75;else if(jump>=176)sumjump=72;else if(jump>=172)sumjump=69;else if(jump>=169)sumjump=66;else if(jump>=163)sumjump=63;else if(jump>=158)sumjump=60;else if(jump>=156)sumjump=50;else if(jump>=153)sumjump=40;else if(jump>=150)sumjump=30;else if(jump>=146)sumjump=20;elsesumjump=10;sumjump*=0.2;return sumjump;
}double male1000()//计算男生1000跑步成绩
{sumrun=0;if(run<=204)sumrun=100;else if(run<=207)sumrun=98;else if(run<=209)sumrun=96;else if(run<=212)sumrun=94;else if(run<=215)sumrun=92;else if(run<=218)sumrun=90;else if(run<=222)sumrun=87;else if(run<=226)sumrun=84;else if(run<=230)sumrun=81;else if(run<=234)sumrun=78;else if(run<=238)sumrun=75;else if(run<=243)sumrun=72;else if(run<=248)sumrun=69;else if(run<=253)sumrun=66;else if(run<=258)sumrun=63;else if(run<=263)sumrun=60;else if(run<=270)sumrun=50;else if(run<=277)sumrun=40;else if(run<=284)sumrun=30;else if(run<=291)sumrun=20;elsesumrun=10;sumrun*=0.3;return sumrun;
}double female800()//计算女生800跑步成绩
{sumrun=0;if(run<=207)sumrun=100;else if(run<=208)sumrun=98;else if(run<=211)sumrun=96;else if(run<=213)sumrun=94;else if(run<=215)sumrun=92;else if(run<=219)sumrun=90;else if(run<=222)sumrun=87;else if(run<=225)sumrun=84;else if(run<=229)sumrun=81;else if(run<=233)sumrun=78;else if(run<=238)sumrun=75;else if(run<=245)sumrun=72;else if(run<=252)sumrun=69;else if(run<=259)sumrun=66;else if(run<=266)sumrun=63;else if(run<=273)sumrun=60;else if(run<=280)sumrun=50;else if(run<=287)sumrun=40;else if(run<=294)sumrun=30;else if(run<=301)sumrun=20;elsesumrun=10;sumrun*=0.3;return sumrun;
}double m_woli_weight()
{double temp=1.0*hand/weight*100;if(temp>=92)index_haw=100;else if(temp>=91)index_haw=98;else if(temp>=90)index_haw=96;else if(temp>=89)index_haw=94;else if(temp>=87)index_haw=92;else if(temp>=86)index_haw=90;else if(temp>=84)index_haw=87;else if(temp>=81)index_haw=84;else if(temp>=79)index_haw=81;else if(temp>=75)index_haw=78;else if(temp>=72)index_haw=75;else if(temp>=70)index_haw=72;else if(temp>=66)index_haw=69;else if(temp>=63)index_haw=66;else if(temp>=59)index_haw=63;else if(temp>=54)index_haw=60;else if(temp>=53)index_haw=50;else if(temp>=51)index_haw=40;else if(temp>=49)index_haw=30;else if(temp>=47)index_haw=20;elseindex_haw=10;index_haw*=0.2;return index_haw;}
double f_woli_weight()
{double temp=1.0*hand/weight*100;if(temp>=74)index_haw=100;else if(temp>=73)index_haw=98;else if(temp>=72)index_haw=96;else if(temp>=71)index_haw=94;else if(temp>=69)index_haw=92;else if(temp>=67)index_haw=90;else if(temp>=66)index_haw=87;else if(temp>=63)index_haw=84;else if(temp>=61)index_haw=81;else if(temp>=58)index_haw=78;else if(temp>=55)index_haw=75;else if(temp>=53)index_haw=72;else if(temp>=50)index_haw=69;else if(temp>=48)index_haw=66;else if(temp>=44)index_haw=63;else if(temp>=40)index_haw=60;else if(temp>=39)index_haw=50;else if(temp>=38)index_haw=40;else if(temp>=36)index_haw=30;else if(temp>=34)index_haw=20;elseindex_haw=10;index_haw*=0.2;return index_haw;}double m_fei_weight()
{double temp=1.0*lv/weight;if(temp>=84)index_lvw=100;else if(temp>=83)index_lvw=98;else if(temp>=82)index_lvw=96;else if(temp>=81)index_lvw=94;else if(temp>=80)index_lvw=92;else if(temp>=78)index_lvw=90;else if(temp>=77)index_lvw=87;else if(temp>=75)index_lvw=84;else if(temp>=73)index_lvw=81;else if(temp>=71)index_lvw=78;else if(temp>=68)index_lvw=75;else if(temp>=66)index_lvw=72;else if(temp>=64)index_lvw=69;else if(temp>=61)index_lvw=66;else if(temp>=58)index_lvw=63;else if(temp>=55)index_lvw=60;else if(temp>=54)index_lvw=50;else if(temp>=52)index_lvw=40;else if(temp>=51)index_lvw=30;else if(temp>=49)index_lvw=20;elseindex_lvw=10;index_lvw*=0.2;return index_lvw;
}
double f_fei_weight()
{double temp=1.0*lv/weight;if(temp>=70)index_lvw=100;else if(temp>=69)index_lvw=98;else if(temp>=68)index_lvw=96;else if(temp>=67)index_lvw=94;else if(temp>=65)index_lvw=92;else if(temp>=64)index_lvw=90;else if(temp>=63)index_lvw=87;else if(temp>=61)index_lvw=84;else if(temp>=59)index_lvw=81;else if(temp>=57)index_lvw=78;else if(temp>=54)index_lvw=75;else if(temp>=53)index_lvw=72;else if(temp>=51)index_lvw=69;else if(temp>=49)index_lvw=66;else if(temp>=46)index_lvw=63;else if(temp>=43)index_lvw=60;else if(temp>=42)index_lvw=50;else if(temp>=41)index_lvw=40;else if(temp>=39)index_lvw=30;else if(temp>=37)index_lvw=20;elseindex_lvw=10;index_lvw*=0.2;return index_lvw;
}double male_standard()
{if(height>=144.0&&height<=144.9){if(weight<41.5)standard_heiw=50;else if(weight<=46.3)standard_heiw=60;else if(weight<=51.9)standard_heiw=100;else if(weight<=53.7)standard_heiw=60;elsestandard_heiw=50;}else if(height>=145.0&&height<=145.9){if(weight<41.8)standard_heiw=50;else if(weight<=46.7)standard_heiw=60;else if(weight<=52.6)standard_heiw=100;else if(weight<=54.5)standard_heiw=60;elsestandard_heiw=50;}else if(height>=146.0&&height<=146.9){if(weight<42.1)standard_heiw=50;else if(weight<=47.1)standard_heiw=60;else if(weight<=53.1)standard_heiw=100;else if(weight<=55.1)standard_heiw=60;elsestandard_heiw=50;}else if(height>=147.0&&height<=147.9){if(weight<42.4)standard_heiw=50;else if(weight<=47.5)standard_heiw=60;else if(weight<=53.7)standard_heiw=100;else if(weight<=55.7)standard_heiw=60;elsestandard_heiw=50;}else if(height>=148.0&&height<=148.9){if(weight<42.6)standard_heiw=50;else if(weight<=47.9)standard_heiw=60;else if(weight<=54.2)standard_heiw=100;else if(weight<=56.3)standard_heiw=60;elsestandard_heiw=50;}else if(height>=149.0&&height<=149.9){if(weight<42.9)standard_heiw=50;else if(weight<=48.3)standard_heiw=60;else if(weight<=54.8)standard_heiw=100;else if(weight<=56.6)standard_heiw=60;elsestandard_heiw=50;}else if(height>=150.0&&height<=150.9){if(weight<43.2)standard_heiw=50;else if(weight<=48.8)standard_heiw=60;else if(weight<=55.4)standard_heiw=100;else if(weight<=57.6)standard_heiw=60;elsestandard_heiw=50;}else if(height>=151.0&&height<=151.9){if(weight<43.5)standard_heiw=50;else if(weight<=49.2)standard_heiw=60;else if(weight<=56.0)standard_heiw=100;else if(weight<=58.2)standard_heiw=60;elsestandard_heiw=50;}else if(height>=152.0&&height<=152.9){if(weight<43.9)standard_heiw=50;else if(weight<=49.7)standard_heiw=60;else if(weight<=56.5)standard_heiw=100;else if(weight<=58.7)standard_heiw=60;elsestandard_heiw=50;}else if(height>=153.0&&height<=153.9){if(weight<44.2)standard_heiw=50;else if(weight<=50.1)standard_heiw=60;else if(weight<=57.0)standard_heiw=100;else if(weight<=59.3)standard_heiw=60;elsestandard_heiw=50;}else if(height>=154.0&&height<=154.9){if(weight<44.7)standard_heiw=50;else if(weight<=50.6)standard_heiw=60;else if(weight<=57.5)standard_heiw=100;else if(weight<=59.8)standard_heiw=60;elsestandard_heiw=50;}else if(height>=155.0&&height<=155.9){if(weight<45.2)standard_heiw=50;else if(weight<=51.1)standard_heiw=60;else if(weight<=58.0)standard_heiw=100;else if(weight<=60.7)standard_heiw=60;elsestandard_heiw=50;}else if(height>=156.0&&height<=156.9){if(weight<45.6)standard_heiw=50;else if(weight<=51.6)standard_heiw=60;else if(weight<=58.7)standard_heiw=100;else if(weight<=61.0)standard_heiw=60;elsestandard_heiw=50;}else if(height>=157.0&&height<=157.9){if(weight<46.1)standard_heiw=50;else if(weight<=52.1)standard_heiw=60;else if(weight<=59.2)standard_heiw=100;else if(weight<=61.5)standard_heiw=60;elsestandard_heiw=50;}else if(height>=158.0&&height<=158.9){if(weight<46.6)standard_heiw=50;else if(weight<=52.6)standard_heiw=60;else if(weight<=59.8)standard_heiw=100;else if(weight<=62.2)standard_heiw=60;elsestandard_heiw=50;}else if(height>=159.0&&height<=159.9){if(weight<46.9)standard_heiw=50;else if(weight<=53.1)standard_heiw=60;else if(weight<=60.3)standard_heiw=100;else if(weight<=62.7)standard_heiw=60;elsestandard_heiw=50;}else if(height>=160.0&&height<=160.9){if(weight<47.4)standard_heiw=50;else if(weight<=53.6)standard_heiw=60;else if(weight<=60.9)standard_heiw=100;else if(weight<=63.4)standard_heiw=60;elsestandard_heiw=50;}else if(height>=161.0&&height<=161.9){if(weight<48.1)standard_heiw=50;else if(weight<=54.3)standard_heiw=60;else if(weight<=61.6)standard_heiw=100;else if(weight<=64.1)standard_heiw=60;elsestandard_heiw=50;}else if(height>=162.0&&height<=162.9){if(weight<48.5)standard_heiw=50;else if(weight<=54.8)standard_heiw=60;else if(weight<=62.2)standard_heiw=100;else if(weight<=64.8)standard_heiw=60;elsestandard_heiw=50;}else if(height>=163.0&&height<=163.9){if(weight<49.0)standard_heiw=50;else if(weight<=55.3)standard_heiw=60;else if(weight<=62.8)standard_heiw=100;else if(weight<=65.3)standard_heiw=60;elsestandard_heiw=50;}else if(height>=164.0&&height<=164.9){if(weight<49.5)standard_heiw=50;else if(weight<=55.9)standard_heiw=60;else if(weight<=63.4)standard_heiw=100;else if(weight<=65.9)standard_heiw=60;elsestandard_heiw=50;}else if(height>=165.0&&height<=165.9){if(weight<49.9)standard_heiw=50;else if(weight<=56.4)standard_heiw=60;else if(weight<=64.1)standard_heiw=100;else if(weight<=66.6)standard_heiw=60;elsestandard_heiw=50;}else if(height>=166.0&&height<=166.9){if(weight<50.4)standard_heiw=50;else if(weight<=56.9)standard_heiw=60;else if(weight<=64.6)standard_heiw=100;else if(weight<=67)standard_heiw=60;elsestandard_heiw=50;}else if(height>=167.0&&height<=167.9){if(weight<50.8)standard_heiw=50;else if(weight<=57.3)standard_heiw=60;else if(weight<=65)standard_heiw=100;else if(weight<=67.5)standard_heiw=60;elsestandard_heiw=50;}else if(height>=168.0&&height<=168.9){if(weight<51.1)standard_heiw=50;else if(weight<=57.7)standard_heiw=60;else if(weight<=65.5)standard_heiw=100;else if(weight<=68.1)standard_heiw=60;elsestandard_heiw=50;}else if(height>=169.0&&height<=169.9){if(weight<51.6)standard_heiw=50;else if(weight<=58.2)standard_heiw=60;else if(weight<=66)standard_heiw=100;else if(weight<=68.6)standard_heiw=60;elsestandard_heiw=50;}else if(height>=170.0&&height<=170.9){if(weight<52.1)standard_heiw=50;else if(weight<=58.7)standard_heiw=60;else if(weight<=66.5)standard_heiw=100;else if(weight<=69.1)standard_heiw=60;elsestandard_heiw=50;}else if(height>=171.0&&height<=171.9){if(weight<52.5)standard_heiw=50;else if(weight<=59.2)standard_heiw=60;else if(weight<=67.2)standard_heiw=100;else if(weight<=69.8)standard_heiw=60;elsestandard_heiw=50;}else if(height>=172.0&&height<=172.9){if(weight<53)standard_heiw=50;else if(weight<=59.8)standard_heiw=60;else if(weight<=67.8)standard_heiw=100;else if(weight<=70.4)standard_heiw=60;elsestandard_heiw=50;}else if(height>=173.0&&height<=173.9){if(weight<53.5)standard_heiw=50;else if(weight<=60.3)standard_heiw=60;else if(weight<=68.4)standard_heiw=100;else if(weight<=71.1)standard_heiw=60;elsestandard_heiw=50;}else if(height>=174.0&&height<=174.9){if(weight<53.8)standard_heiw=50;else if(weight<=61)standard_heiw=60;else if(weight<=69.3)standard_heiw=100;else if(weight<=72)standard_heiw=60;elsestandard_heiw=50;}else if(height>=175.0&&height<=175.9){if(weight<54.5)standard_heiw=50;else if(weight<=61.5)standard_heiw=60;else if(weight<=69.9)standard_heiw=100;else if(weight<=72.7)standard_heiw=60;elsestandard_heiw=50;}else if(height>=176.0&&height<=176.9){if(weight<55.3)standard_heiw=50;else if(weight<=62.2)standard_heiw=60;else if(weight<=70.9)standard_heiw=100;else if(weight<=73.8)standard_heiw=60;elsestandard_heiw=50;}else if(height>=177.0&&height<=177.9){if(weight<55.8)standard_heiw=50;else if(weight<=62.7)standard_heiw=60;else if(weight<=71.6)standard_heiw=100;else if(weight<=74.5)standard_heiw=60;elsestandard_heiw=50;}else if(height>=178.0&&height<=178.9){if(weight<56.2)standard_heiw=50;else if(weight<=63.3)standard_heiw=60;else if(weight<=72.3)standard_heiw=100;else if(weight<=75.3)standard_heiw=60;elsestandard_heiw=50;}else if(height>=179.0&&height<=179.9){if(weight<56.7)standard_heiw=50;else if(weight<=63.8)standard_heiw=60;else if(weight<=72.8)standard_heiw=100;else if(weight<=75.8)standard_heiw=60;elsestandard_heiw=50;}else if(height>=180.0&&height<=180.9){if(weight<57.1)standard_heiw=50;else if(weight<=64.3)standard_heiw=60;else if(weight<=73.5)standard_heiw=100;else if(weight<=76.5)standard_heiw=60;elsestandard_heiw=50;}else if(height>=181.0&&height<=181.9){if(weight<57.7)standard_heiw=50;else if(weight<=64.9)standard_heiw=60;else if(weight<=74.2)standard_heiw=100;else if(weight<=77.3)standard_heiw=60;elsestandard_heiw=50;}else if(height>=182.0&&height<=182.9){if(weight<58.2)standard_heiw=50;else if(weight<=65.6)standard_heiw=60;else if(weight<=74.9)standard_heiw=100;else if(weight<=77.8)standard_heiw=60;elsestandard_heiw=50;}else if(height>=183.0&&height<=183.9){if(weight<58.8)standard_heiw=50;else if(weight<=66.2)standard_heiw=60;else if(weight<=75.7)standard_heiw=100;else if(weight<=78.8)standard_heiw=60;elsestandard_heiw=50;}else if(height>=184.0&&height<=184.9){if(weight<59.3)standard_heiw=50;else if(weight<=66.8)standard_heiw=60;else if(weight<=76.3)standard_heiw=100;else if(weight<=79.4)standard_heiw=60;elsestandard_heiw=50;}else if(height>=185.0&&height<=185.9){if(weight<59.9)standard_heiw=50;else if(weight<=67.4)standard_heiw=60;else if(weight<=77)standard_heiw=100;else if(weight<=80.2)standard_heiw=60;elsestandard_heiw=50;}else if(height>=186.0&&height<=186.9){if(weight<60.4)standard_heiw=50;else if(weight<=68.1)standard_heiw=60;else if(weight<=77.8)standard_heiw=100;else if(weight<=81.1)standard_heiw=60;elsestandard_heiw=50;}else if(height>=187.0&&height<=187.9){if(weight<60.9)standard_heiw=50;else if(weight<=68.7)standard_heiw=60;else if(weight<=78.6)standard_heiw=100;else if(weight<=81.9)standard_heiw=60;elsestandard_heiw=50;}else if(height>=188.0&&height<=188.9){if(weight<61.4)standard_heiw=50;else if(weight<=69.2)standard_heiw=60;else if(weight<=79.3)standard_heiw=100;else if(weight<=82.6)standard_heiw=60;elsestandard_heiw=50;}else if(height>=189.0&&height<=189.9){if(weight<61.8)standard_heiw=50;else if(weight<=69.8)standard_heiw=60;else if(weight<=79.9)standard_heiw=100;else if(weight<=83.2)standard_heiw=60;elsestandard_heiw=50;}else if(height>=190.0&&height<=190.9){if(weight<62.4)standard_heiw=50;else if(weight<=70.4)standard_heiw=60;else if(weight<=80.5)standard_heiw=100;else if(weight<=83.6)standard_heiw=60;elsestandard_heiw=50;}standard_heiw*=0.1;return standard_heiw;
}double female_standard()
{if(height>=140.0&&height<=140.9){if(weight<36.5)standard_heiw=50;else if(weight<=42.4)standard_heiw=60;else if(weight<=50.6)standard_heiw=100;else if(weight<=53.3)standard_heiw=60;elsestandard_heiw=50;}else if(height>=141.0&&height<=141.9){if(weight<36.6)standard_heiw=50;else if(weight<=42.9)standard_heiw=60;else if(weight<=51.3)standard_heiw=100;else if(weight<=54.1)standard_heiw=60;elsestandard_heiw=50;}else if(height>=142.0&&height<=142.9){if(weight<36.8)standard_heiw=50;else if(weight<=43.2)standard_heiw=60;else if(weight<=51.9)standard_heiw=100;else if(weight<=54.7)standard_heiw=60;elsestandard_heiw=50;}else if(height>=143.0&&height<=143.9){if(weight<37)standard_heiw=50;else if(weight<=43.5)standard_heiw=60;else if(weight<=52.3)standard_heiw=100;else if(weight<=55.2)standard_heiw=60;elsestandard_heiw=50;}else if(height>=144.0&&height<=144.9){if(weight<37.2)standard_heiw=50;else if(weight<=43.7)standard_heiw=60;else if(weight<=52.7)standard_heiw=100;else if(weight<=56.6)standard_heiw=60;elsestandard_heiw=50;}else if(height>=145.0&&height<=145.9){if(weight<37.5)standard_heiw=50;else if(weight<=44)standard_heiw=60;else if(weight<=53.1)standard_heiw=100;else if(weight<=56.1)standard_heiw=60;elsestandard_heiw=50;}else if(height>=146.0&&height<=146.9){if(weight<37.9)standard_heiw=50;else if(weight<=44.4)standard_heiw=60;else if(weight<=53.7)standard_heiw=100;else if(weight<=56.7)standard_heiw=60;elsestandard_heiw=50;}else if(height>=147.0&&height<=147.9){if(weight<38.5)standard_heiw=50;else if(weight<=44)standard_heiw=60;else if(weight<=54.3)standard_heiw=100;else if(weight<=57.3)standard_heiw=60;elsestandard_heiw=50;}else if(height>=148.0&&height<=148.9){if(weight<39.1)standard_heiw=50;else if(weight<=45.7)standard_heiw=60;else if(weight<=55.0)standard_heiw=100;else if(weight<=58.0)standard_heiw=60;elsestandard_heiw=50;}else if(height>=149.0&&height<=149.9){if(weight<39.5)standard_heiw=50;else if(weight<=46.2)standard_heiw=60;else if(weight<=55.6)standard_heiw=100;else if(weight<=58.7)standard_heiw=60;elsestandard_heiw=50;}else if(height>=150.0&&height<=150.9){if(weight<39.9)standard_heiw=50;else if(weight<=46.6)standard_heiw=60;else if(weight<=56.2)standard_heiw=100;else if(weight<=59.3)standard_heiw=60;elsestandard_heiw=50;}else if(height>=151.0&&height<=151.9){if(weight<40.3)standard_heiw=50;else if(weight<=47.1)standard_heiw=60;else if(weight<=56.7)standard_heiw=100;else if(weight<=59.8)standard_heiw=60;elsestandard_heiw=50;}else if(height>=152.0&&height<=152.9){if(weight<40.8)standard_heiw=50;else if(weight<=47.6)standard_heiw=60;else if(weight<=57.4)standard_heiw=100;else if(weight<=60.5)standard_heiw=60;elsestandard_heiw=50;}else if(height>=153.0&&height<=153.9){if(weight<41.4)standard_heiw=50;else if(weight<=48.2)standard_heiw=60;else if(weight<=57.9)standard_heiw=100;else if(weight<=61.1)standard_heiw=60;elsestandard_heiw=50;}else if(height>=154.0&&height<=154.9){if(weight<41.9)standard_heiw=50;else if(weight<=48.8)standard_heiw=60;else if(weight<=58.6)standard_heiw=100;else if(weight<=61.9)standard_heiw=60;elsestandard_heiw=50;}else if(height>=155.0&&height<=155.9){if(weight<42.3)standard_heiw=50;else if(weight<=49.1)standard_heiw=60;else if(weight<=59.1)standard_heiw=100;else if(weight<=62.4)standard_heiw=60;elsestandard_heiw=50;}else if(height>=156.0&&height<=156.9){if(weight<42.9)standard_heiw=50;else if(weight<=49.7)standard_heiw=60;else if(weight<=59.7)standard_heiw=100;else if(weight<=63)standard_heiw=60;elsestandard_heiw=50;}else if(height>=157.0&&height<=157.9){if(weight<43.5)standard_heiw=50;else if(weight<=50.3)standard_heiw=60;else if(weight<=60.4)standard_heiw=100;else if(weight<=63.6)standard_heiw=60;elsestandard_heiw=50;}else if(height>=158.0&&height<=158.9){if(weight<44)standard_heiw=50;else if(weight<=50.8)standard_heiw=60;else if(weight<=61.2)standard_heiw=100;else if(weight<=64.5)standard_heiw=60;elsestandard_heiw=50;}else if(height>=159.0&&height<=159.9){if(weight<44.5)standard_heiw=50;else if(weight<=51.4)standard_heiw=60;else if(weight<=61.7)standard_heiw=100;else if(weight<=65.1)standard_heiw=60;elsestandard_heiw=50;}else if(height>=160.0&&height<=160.9){if(weight<45.0)standard_heiw=50;else if(weight<=52.1)standard_heiw=60;else if(weight<=62.3)standard_heiw=100;else if(weight<=65.6)standard_heiw=60;elsestandard_heiw=50;}else if(height>=161.0&&height<=161.9){if(weight<45.4)standard_heiw=50;else if(weight<=52.5)standard_heiw=60;else if(weight<=62.8)standard_heiw=100;else if(weight<=66.2)standard_heiw=60;elsestandard_heiw=50;}else if(height>=162.0&&height<=162.9){if(weight<45.9)standard_heiw=50;else if(weight<=53.1)standard_heiw=60;else if(weight<=63.4)standard_heiw=100;else if(weight<=66.8)standard_heiw=60;elsestandard_heiw=50;}else if(height>=163.0&&height<=163.9){if(weight<46.4)standard_heiw=50;else if(weight<=53.6)standard_heiw=60;else if(weight<=63.9)standard_heiw=100;else if(weight<=67.3)standard_heiw=60;elsestandard_heiw=50;}else if(height>=164.0&&height<=164.9){if(weight<46.8)standard_heiw=50;else if(weight<=54.2)standard_heiw=60;else if(weight<=64.5)standard_heiw=100;else if(weight<=67.9)standard_heiw=60;elsestandard_heiw=50;}else if(height>=165.0&&height<=165.9){if(weight<47.4)standard_heiw=50;else if(weight<=54.8)standard_heiw=60;else if(weight<=65)standard_heiw=100;else if(weight<=68.3)standard_heiw=60;elsestandard_heiw=50;}else if(height>=166.0&&height<=166.9){if(weight<48)standard_heiw=50;else if(weight<=55.4)standard_heiw=60;else if(weight<=65.5)standard_heiw=100;else if(weight<=68.9)standard_heiw=60;elsestandard_heiw=50;}else if(height>=167.0&&height<=167.9){if(weight<48.5)standard_heiw=50;else if(weight<=56)standard_heiw=60;else if(weight<=66.2)standard_heiw=100;else if(weight<=69.5)standard_heiw=60;elsestandard_heiw=50;}else if(height>=168.0&&height<=168.9){if(weight<49)standard_heiw=50;else if(weight<=56.4)standard_heiw=60;else if(weight<=66.7)standard_heiw=100;else if(weight<=70.1)standard_heiw=60;elsestandard_heiw=50;}else if(height>=169.0&&height<=169.9){if(weight<49.4)standard_heiw=50;else if(weight<=56.8)standard_heiw=60;else if(weight<=67.3)standard_heiw=100;else if(weight<=70.7)standard_heiw=60;elsestandard_heiw=50;}else if(height>=170.0&&height<=170.9){if(weight<49.9)standard_heiw=50;else if(weight<=57.3)standard_heiw=60;else if(weight<=67.9)standard_heiw=100;else if(weight<=71.4)standard_heiw=60;elsestandard_heiw=50;}else if(height>=171.0&&height<=171.9){if(weight<50.2)standard_heiw=50;else if(weight<=57.8)standard_heiw=60;else if(weight<=68.5)standard_heiw=100;else if(weight<=72.1)standard_heiw=60;elsestandard_heiw=50;}else if(height>=172.0&&height<=172.9){if(weight<50.7)standard_heiw=50;else if(weight<=58.4)standard_heiw=60;else if(weight<=69.1)standard_heiw=100;else if(weight<=72.7)standard_heiw=60;elsestandard_heiw=50;}else if(height>=173.0&&height<=173.9){if(weight<51)standard_heiw=50;else if(weight<=58.8)standard_heiw=60;else if(weight<=69.6)standard_heiw=100;else if(weight<=73.1)standard_heiw=60;elsestandard_heiw=50;}else if(height>=174.0&&height<=174.9){if(weight<51.3)standard_heiw=50;else if(weight<=59.3)standard_heiw=60;else if(weight<=70.2)standard_heiw=100;else if(weight<=73.6)standard_heiw=60;elsestandard_heiw=50;}else if(height>=175.0&&height<=175.9){if(weight<51.9)standard_heiw=50;else if(weight<=59.9)standard_heiw=60;else if(weight<=70.8)standard_heiw=100;else if(weight<=74.4)standard_heiw=60;elsestandard_heiw=50;}else if(height>=176.0&&height<=176.9){if(weight<52.4)standard_heiw=50;else if(weight<=60.4)standard_heiw=60;else if(weight<=71.5)standard_heiw=100;else if(weight<=75.1)standard_heiw=60;elsestandard_heiw=50;}else if(height>=177.0&&height<=177.9){if(weight<52.8)standard_heiw=50;else if(weight<=61)standard_heiw=60;else if(weight<=72.1)standard_heiw=100;else if(weight<=75.7)standard_heiw=60;elsestandard_heiw=50;}else if(height>=178.0&&height<=178.9){if(weight<53.2)standard_heiw=50;else if(weight<=61.5)standard_heiw=60;else if(weight<=72.6)standard_heiw=100;else if(weight<=76.2)standard_heiw=60;elsestandard_heiw=50;}else if(height>=179.0&&height<=179.9){if(weight<53.6)standard_heiw=50;else if(weight<=62)standard_heiw=60;else if(weight<=73.2)standard_heiw=100;else if(weight<=76.7)standard_heiw=60;elsestandard_heiw=50;}else if(height>=180.0&&height<=180.9){if(weight<54.1)standard_heiw=50;else if(weight<=62.5)standard_heiw=60;else if(weight<=73.7)standard_heiw=100;else if(weight<=77)standard_heiw=60;elsestandard_heiw=50;}else if(height>=181.0&&height<=181.9){if(weight<54.5)standard_heiw=50;else if(weight<=63.1)standard_heiw=60;else if(weight<=74.3)standard_heiw=100;else if(weight<=77.8)standard_heiw=60;elsestandard_heiw=50;}else if(height>=182.0&&height<=182.9){if(weight<55.1)standard_heiw=50;else if(weight<=63.8)standard_heiw=60;else if(weight<=75)standard_heiw=100;else if(weight<=79.4)standard_heiw=60;elsestandard_heiw=50;}else if(height>=183.0&&height<=183.9){if(weight<55.6)standard_heiw=50;else if(weight<=64.5)standard_heiw=60;else if(weight<=75.7)standard_heiw=100;else if(weight<=80.4)standard_heiw=60;elsestandard_heiw=50;}else if(height>=184.0&&height<=184.9){if(weight<56.1)standard_heiw=50;else if(weight<=65.3)standard_heiw=60;else if(weight<=76.6)standard_heiw=100;else if(weight<=81.2)standard_heiw=60;elsestandard_heiw=50;}else if(height>=185.0&&height<=185.9){if(weight<56.8)standard_heiw=50;else if(weight<=66.1)standard_heiw=60;else if(weight<=77.5)standard_heiw=100;else if(weight<=82.4)standard_heiw=60;elsestandard_heiw=50;}else if(height>=186.0&&height<=186.9){if(weight<57.3)standard_heiw=50;else if(weight<=66.9)standard_heiw=60;else if(weight<=78.6)standard_heiw=100;else if(weight<=83.3)standard_heiw=60;elsestandard_heiw=50;}standard_heiw*=0.1;return standard_heiw;
}
int main()
{input();cout<<endl;cout<<"**************************"<<endl;cout<<endl;//double sum,sumjump,sumrun,index_haw,index_lvw,standard_heiw;//定义总成绩,立定跳远成绩,跑步成绩,握力体重指数成绩,肺活量体重指数成绩,身高标准体重成绩if(flag){sum=m_ldty()+male1000()+m_woli_weight()+m_fei_weight()+male_standard();cout<<"立定跳远成绩为: "<<m_ldty()<<endl;cout<<"1000跑步成绩为: "<<male1000()<<endl;cout<<"握力体重指数成绩为: "<<m_woli_weight()<<endl;cout<<"肺活量体重指数成绩为: "<<m_fei_weight()<<endl;cout<<"身高标准体重成绩为: "<<male_standard()<<endl;cout<<endl;cout<<"总成绩为:"<<sum<<endl;cout<<endl;cout<<"**************************";}else{sum=f_ldty()+female800()+f_woli_weight()+f_fei_weight()+female_standard();cout<<"立定跳远成绩为: "<<f_ldty()<<endl;cout<<"800跑步成绩为: "<<female800()<<endl;cout<<"握力体重指数成绩为: "<<f_woli_weight()<<endl;cout<<"肺活量体重指数成绩为: "<<f_fei_weight()<<endl;cout<<"身高标准体重成绩为: "<<female_standard()<<endl;cout<<endl;cout<<"总成绩为:"<<sum<<endl;cout<<endl;cout<<"**************************";}return 0;
}

代码虽然很长,但没有复杂的语句,很多都是重复的,就是那些数据得一个一个得边看表边写代码,表上那些密密麻麻的数据快把我的眼看瞎了。不过最后终于完成了,还是挺高兴的。

运行截图:

烟台大学体测成绩查询程序相关推荐

  1. 烟台大学体侧成绩估算(根据2012年标准)男生版

    #include<iostream> #include<iomanip> #include<cmath> using namespace std; int main ...

  2. 16.体测成绩判定(c函数调用)

    注意:本篇文章有点长耐心看完 案例描述: 2014年秋季起,我国执行学生体质健康测试的新标准,大学生体测成绩低于50分将不能毕  业,按结业或肄业处理.此项标准的执行引起了学校以及诸多在校大学生的密切 ...

  3. python体测成绩数据分析_Django xadmin 体测成绩管理平台总结

    Django xadmin 体测成绩管理平台总结 这是写给自己总结,记录一下历史10天开发一个小web程序的经历. 起源于一个故事,做个有爱心的程序员 有个多年简书好友小赵希望我帮他做个成绩收集软件, ...

  4. C语言程序设计--体测成绩信息管理系统

    #include<stdio.h> #include<stdlib.h> #include<string.h> #define MAX(x,y) (x>y?x ...

  5. c语言学生成绩查询课设报告,C语言课设报告(学生考试成绩查询程序)【荐】.doc...

    C语言课设报告(学生考试成绩查询程序)[荐].doc 学生考试成绩查询程序 学号:******** 姓名:***** 完成日期:****年月 通过键盘输入学生的考试信息,包括:学号.姓名.课程名称.学 ...

  6. 大学生体测成绩判断c语言_体育改革瞄准高校,体测不过关可能真的毕不了业了...

    「ECO氪体」体育圈人www.ecosports.cn 文/ 圈哥 回忆上学期间,体育最令你头疼的时刻是什么?是不是在体育中考将要到来之前,还没日没夜枯燥的训练和近乎苛刻的饮食控制?而现在,体育似乎不 ...

  7. python体测成绩数据分析统计服_体测成绩数据分析

    import numpy as np import pandas as pd from pandas import Series,DataFrame import matplotlib.pyplot ...

  8. 函数(2)——4.兔子数列5.汉诺塔6.综合案例-RSA算法7.综合案例-体测成绩判定2021.11.16

    4.兔子数列(斐波那契数列) 一对兔子在出生两个月后,每个月能生出一对小兔子.现有一对刚出生的兔子,如果所有兔子都不死,那么一年后共有多少对兔子? 分析 n=1,兔子=1对: n=2,兔子=1对: n ...

  9. 关于我对体测成绩进行分析这件事

    朋友你好,作为一个刚刚入门计算机专业的普通大学生,很高兴认识你,作为本次大创项目的主题,我们对体测成绩进行了数据分析,这篇文章就是对本次分析的一个概括与总结,如果可以给你一些启发,就最好不过了! 那么 ...

最新文章

  1. TagCloudView云标签的灵活运用
  2. Linux USB 驱动开发(一)—— USB设备基础概念【转】
  3. 学习笔记——os模块常见列表
  4. Python的定时器
  5. xp框架下载官方_斐讯路由器系列「K1-K2-K2P-K2T」-Breed刷入工具v1.1支持XP系统
  6. Qt笔记-Q_UNUSED解决编译器unused paramenter告警
  7. Unity游戏开发——新发教你做游戏(二):60个Unity免费资源获取网站
  8. 为什么Go语言在今天能如此火热?
  9. 合成器插件:KORG Software M1 for Mac
  10. 矩阵分析L1 线性空间基础
  11. 收藏的软件测试学习资源
  12. 用最生动的语言重现经典!听我细细道来冯·诺依曼体系结构
  13. EC11编码器和单片机通信
  14. vue ui创建项目 连接断开(errno:-4058,syscall: ‘scandir‘,code:’ ENOENT’,path: ‘C: ....../locales)
  15. tensorFlow2.0基本操作(一)
  16. 【分类汇总】idea快捷键、idea配置、常用插件
  17. Module use of python36.dll conflicts with this version of Python
  18. C语言程序设计—学籍信息管理系统
  19. Mac上用优盘怎么才能写入和修改
  20. 中南大学:误解已解除!

热门文章

  1. 3、信管网A公司准备研发一款手机无线充电器,项目启动时间为2018年1月
  2. MapReduce 运行原理(万字长篇 原理 + 案例)
  3. 前后端分离情况下pdf文件在浏览器中预览的实现
  4. wap手机网页悬浮广告代码遮盖原有网页内容怎么办?
  5. 06注解驱动的入门案例
  6. 图片模块右上角添加hot、news小图标
  7. Mac安装brew报错汇总
  8. 【Paper Reading】论文阅读SOLO:Segmenting Objects by Location
  9. 中国东极岛,“挑战吧净味君第二季之一级带货王”巅峰成团赛,名单揭晓!
  10. 台式计算机上无图像设备怎么办,WinXP台式机如何找回消失的摄像头图标