Hi .. i want to print this pattern of number using loops . if input is 5 then output should be ...
155555
224444
333333
444422
555551
i have solved
1
22
333
4444
55555
but another reflection is not coming in my mind ... and making me confuse need your help . My code for the half is
#include <iostream>
using namespace std;
int main(){
int n=5,i;
for(i=1;i<=n;i++)
{
for(int a=1;a<=i;a++)
{
cout<<i;
}
cout<<endl;
}
system("pause");
}