/* Demonstrates functions */ #include using namespace std; // If the function is instead defined_after_main(), the // declaration double mySquare(int x); must appear here! double mySquare( int aX) { // Function definition follows return (aX * aX); } int main() { // Start of program int endNumber; // Definitions char ch; do { cout << "Insert the number of squares desired "; cin >> endNumber; cout << endl; for (int i=1; i> ch; } // The program stays in this loop until y or Y is entered while (ch == 'y' || ch == 'Y'); }