Write a function IsoTriangle() that takes a sizw parameter and displays an isosceles triangle with that many lines. Use the DrawBar() function as a Basis.
it should look like this:
*
***
*****
*******
this is the drawbar() function:
/Overloaded DrawBar() program
Illustrated overloaded DrawBar functions/
#include <iostream>
using namespace std;
void DrawBar(int Length)
/*Displays a bar of asterisks of length Length.
Length assumed>=0 */
{
const char Mark= '*';
for (int i=0; i<Length; i++)
cout<<Mark;
cout<<endl;
}
//---------
void DrawBar(int Length, char Mark)
/*Diplays a bar of length Length using character Mark.
Length assumed>=0 */
{
for (int i=0; i<Length; i++)
cout<<Mark;
cout<<endl;
}
//----------
int main()
{
DrawBar(1);
DrawBar(2);
DrawBar(3);
DrawBar(4);
return(0);
}