#include <iostream>#include <iomanip>using namespace std;int main (void){ // declare variables char ch; int num; int con = 1; int spce; // Prompt user for input of a character and a number cout << "Please enter a character" << endl; cin >> ch; cout << "Please enter an odd whole number" << endl; cin >> num; spce = num + 1; // inform user of their previous input cout << "The character to be used is " << '"' << ch << '"' << endl; cout << "The whole number to be used is " << num << endl; // check to see is integer is odd if (num % 2 != 0) { while (con < num) { int y = 0; cout << setw (spce); while (y < con) { cout << ch; y++; } cout << endl; con += 2; spce--; } while (con >= 1) { int s = 0; cout << setw (spce); while (s < con) { cout << ch; s++; } cout << endl; con -= 2; spce++; } } else cout << "You entered an even number... please enter the choose an odd number" << endl; return 0;}