#include int main( void ) { int num; for (;;) /* or while ( 1 ) */ { cout << "Please enter a number: "; if ( ! ( cin >> num ) ) break; int square = num * num; cout << "Square of " << num << " = " << square << endl; char ch; cout << "Another square? (y/n) "; if ( cin >> ch && ch != 'y' ) break; } }