C++计算球弹跳的高度_mysql
程序:

//Author:PanDaoxi (File 2) 
#include <iostream>
using namespace std;

int main(){
	double ten,h,sum;
	cin >> h;
	sum += h;
	
	int n = 10;
	while (n - 1 > 0){
		sum += h;
		h /= 2;
		n --;
	}
	ten = h;
	cout << sum << endl;
	cout << ten << endl;
	return 0;
}