#include<stdio.h>
int main()
{
int i,a,b;
for(a=5, b=1; b<=5;a--,b++) // Here, a>=1 condition is optional. We can use either a>=1 or b<=5.
{
for(i=1;i<a;i++)
printf(" ");
for(i=1;i<=b;i++)
printf("%d ",i);
printf("\n");
}
return 0;
}