+ 3
challenge to all coders
display 1 ** 2 *** 3 **** 4
4 Antworten
+ 14
Wait. I will make
+ 14
+ 4
Mr. B.ARAVIND KUMAR will you please post the answer for your question?
I almost reached it.
#include <iostream>
using namespace std;
int main() {
int i,j;
int n=6;
int count;
int counts;
counts=1;
count=1;
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{
if((j==count))
{
cout<<j;
count++;
}
else
cout<<" ";
}
cout<<endl;
for(j=0;j<=i;j++)
{
if(i!=n)
cout<<"*";
counts++;
}
cout<<endl;
for(j=1;j<counts-2;j++)
{
cout<<" ";
}
}
return 0;
}
0
http://code.sololearn.com/cL0ZS5zVrkri/
Will go from the other side if screen too small