A ball drops from 100 cm and bounces back half as high each time (whole-number division, so the rest is dropped). Show the height of every bounce, one per line, stopping once it is under 10 cm.
50 25 12 6
#include <iostream>
using namespace std;
int main() {
int height = 100;
while (height >= 10) {
height = height / 2;
// your code here: show how high this bounce went
}
return 0;
}
Run tries the examples. When they look right, Submit.