How do I ask the user which function they would like to recalland what values they would like to use for int n, char c, or boolo?
I have the following program done already:
#include <iostream>
using namespace std;
void printChar(int n,char c)
{
for(int i=0;i<n;i++)
{
if(c==’ ‘)
cout<<” “;
else
cout<<c;
}
//cout<<endl;
}
void printTriangle(int n, char c,bool o)
{
int e=1;
int temp_count=0;
if(o == false){
for(int a=1;a<=n;a++)
{
temp_count = (n)- a;
printChar(temp_count,’ ‘);
temp_count = e;
printChar(temp_count,c);
printChar(1,’n’);
e=e+2;
}
}
else
{
for(int i = n-1; i >= 1; i–)
{
//for loop to put space
temp_count = n-i;
printChar(temp_count,’ ‘);
temp_count =
OR
OR