- 分享
- 0
- 人气
- 0
- 主题
- 1
- 帖子
- 11
- UID
- 168411
- 积分
- 21
- 阅读权限
- 11
- 注册时间
- 2008-9-24
- 最后登录
- 2018-10-31
- 在线时间
- 104 小时
|
你的 "} while(final_height<=0 || initial_height<final_height );" 里的variables都不是变数。你要它如何loop.
Display_Title();
do
{
height_moon = initial_height;
height_earth = initial_height;
// FUNCTION CALL
Display_Title();
/*Calculation (impact_speed_earth, height_earth, impact_speed_moon, height_moon,height_earth);*/
Calculation (impact_speed_earth, height_earth, impact_speed_moon, height_moon, initial_height);
Display_Result (impact, impact_speed_earth, height_earth, impact_speed_moon, height_moon);
impact++;
// when 6th impact,height > final height,impact ++ to 7,and now the height < final height,then no more impact++.
} while(height_earth<=0 || height_earth<final_height ); |
|