#include<iostream.h>
#include<conio.h>
void main()
{
int j,i,k,l;
char c;
clrscr();
do
{
cout<<"Enter the number of stars in the base..";
cin>>k;
for (i=1;i<=k;i++)
{
for (j=1;j<=i;j++)
cout<<"* ";
cout<<endl;
}
cout<<"\nWant to try more..(y/n)\n";
cin>>c;
}
while(c=='y');
getch();
}
A blog containing C++ programs based on Classes, Objects and related concepts like Inheritance, Polymorphism etc.
100 Contemporary Living Room Designs
Monday, December 7, 2020
C++ program to print an lower triangle using stars.
Subscribe to:
Posts (Atom)