Dec 22, 2016 at 5:06pm
i want to make star row and coulombs.
Last edited on Dec 22, 2016 at 5:10pm
Dec 23, 2016 at 1:36pm
I think you mean columns, not coulombs.
Please provide and example of the output you're trying to produce.
Dec 26, 2016 at 10:08am
guys i want it like these pattern below
*
***
*****
***
*
Dec 26, 2016 at 10:17am
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;
}
Jan 8, 2017 at 2:41pm
thank you guys, kemort's answer is the best one.