challenge to all coders | Sololearn: Learn to code for FREE!

+3

challenge to all coders

display 1 ** 2 *** 3 **** 4

11/6/2017 1:56:04 PM

B.ARAVIND KUMAR

6 Answers

New Answer

+14

Wait. I will make

+14

My try - https://code.sololearn.com/cWCR2ol3buYq/?ref=app

+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