11/6/2017 1:56:04 PM
B.ARAVIND KUMAR6 Answers
New AnswerMr. 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; }
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message