i want to make star row and coulombs.
Last edited on
I think you mean columns, not coulombs.
Please provide and example of the output you're trying to produce.
guys i want it like these pattern below
*
***
*****
***
*
guys i found this one but want to make the lower part too.
#include <iostream>
using namespace std;
int main()
{
int i,space,rows,k=0;
cout<<"Enter the number of rows: ";
cin>>rows;
for(i=1;i<=rows;++i)
{
for(space=1;space<=rows-i;++space)
{
cout<<" ";
}
while(k!=2*i-1)
{
cout<<"* ";
++k;
}
k=0;
cout<<"\n";
}
return 0;
}
thank you guys, kemort's answer is the best one.