doubleBMI;
BMI=wt_kilogram/(ht_meter*ht_meter);
cout<<\体重指数)is\
return0;
}
//ex3.3以度,分,秒输入,以度输出
#include
constintminutes_per_degree=60;
constintseconds_per_minute=60;
intmain()
{
usingnamespacestd;
cout<<\
cout<<\
intdegree;
cin>>degree;
cout<<\
intminute;
cin>>minute;
cout<<\
intsecond;
cin>>second;
doubleshow_in_degree;
show_in_degree=(double)degree+(double)minute/minutes_per_degree+(double)se
cond/minutes_per_degree/seconds_per_minute;
cout< degree<<\ return0; } //ex3.4 #include constinthours_per_day=24; constintminutes_per_hour=60; constintseconds_per_minute=60; intmain() { usingnamespacestd; cout<<\ longseconds; cin>>seconds; intDay,Hour,Minute,Second; Day=seconds/seconds_per_minute/minutes_per_hour/hours_per_day; Hour=seconds/seconds_per_minute/minutes_per_hour%hours_per_day; Minute=seconds/seconds_per_minute%minutes_per_hour; Second=seconds%seconds_per_minute; cout< \ return0; } //ex3.5 #include intmain() { usingnamespacestd; cout<<\ longlongworld_population; cin>>world_population; cout<<\ longlongUS_population; cin>>US_population; doublepercentage; percentage=(double)US_population/world_population*100; cout<<\ return0; } //ex3.6?汽车耗油量-美国(mpg)or欧洲风格(L/100Km) #include intmain() { ?usingnamespacestd; ?cout<<\ ?doublem_distance; ?cin>>m_distance; ?cout<<\ ?doublem_gasoline; ?cin>>m_gasoline; ?cout<<\ ?cout<<\ ?cout<<\ ?doublek_distance; ?cin>>k_distance;