Ques. Programming Pattern to Print  2*N  Number of rows for input Pattern?

3
44
555
6666
555
44
3

#include

using namespace std;

int main()
{
int n=4,num=n-1;
for(int i=1;i<=n;i++)
{
for(int j=1;j<=i;j++)
cout<<num;
num++;
cout<<endl;
}
num–;
for(int i=n;i>=1;i–)
{
for(int j=1;j<=i;j++)
cout<<num;
num–;
cout<<endl;
}


return 0;

}

Please do comment the code in other languages :).

For MindTree Programming – Coding Questions Visit our MindTree Previous Coding Dashboard