Write a function to draw a right angle triangle.
#include<iostream>
void Draw_Asterisks();
using namespace std;
int main()
{
Draw_Asterisks();
}
void Draw_Asterisks()
{
for (int lines = 1; lines<=5; lines++)
{
for (int i = 1; i<=2*lines-1 ; i++)
cout<<"*";
cout<<endl;
}
}
#include<iostream>
void Draw_Asterisks();
using namespace std;
int main()
{
Draw_Asterisks();
}
void Draw_Asterisks()
{
for (int lines = 1; lines<=5; lines++)
{
for (int i = 1; i<=2*lines-1 ; i++)
cout<<"*";
cout<<endl;
}
}
No comments:
Post a Comment