// robot.cxx #include #include using std::cout; using std::cin; int main() { // Declare a symbolic constant for inches in a foot const int INCHES_IN_FOOT = 12; int distance, start_distance, lap; cout << "Please enter the distance to the target in inches\n"; cin >> start_distance; cout << "Please enter the distance travelled in each burst\n"; cin >> lap; distance = start_distance; while( distance > 0 ) { cout << "Currently " << distance / INCHES_IN_FOOT << " feet and " << distance % INCHES_IN_FOOT << " inches away from target\n"; distance = distance - lap; } return EXIT_SUCCESS; }