0

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);
}
3
Contributors
3
Replies
21
Views
2 Years
Discussion Span
Last Post by JamesCherrill
0

can you help me using the DrawBar function?
it should look like a pyramid

0

A. No
B. That's not Java
C. The answer is the first result on Google no matter which part of that ancient question you search with, plagiarize away

0

If you don't know what language you are coding in then you need more help than anyone here is likely to give.
Regardless of language, this is an easy exercise for a beginner, so try to do it yourself before asking for help.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.