Can you please help me do a asterisks of pyramid using the drawbar function, im new to c++ please help. Thank you in advance
this is the drawbar function:
the output should look like:
*
***
*****
*******
/*Overloaded drawbar() program.*/
#include<iostream.h>
void DrawBar(int Length)
/*Diplays 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();
DrawBar();
DrawBar();
DrawBar();
return();
}