// Print second and third powers of a number until happy. // Michael Rothstein // 2-17.2014 #include using std::cin; using std::cout; using std::endl; int main(){ int x; char a; do { cout << "Input a number:"; cin >> x; cout << x << "^2= " << x*x << ", " << x << "^3= " << x*x*x << endl; cout << "More? "; cin >> a; }while (a == 'y'); }