#include <stdio.h>
int main()
{
int i,j,k;
int n=2; //size
for(i=4;i>=1;i--)
{
/* for 2nd part */
for(j=1;j<=i;j++)
{
printf("%2d ",n);
n+=2;
}
printf("\n");
}
}
Let's connect think dots to code ...
#include <stdio.h>
int main()
{
int i,j,k;
int n=2; //size
for(i=4;i>=1;i--)
{
/* for 2nd part */
for(j=1;j<=i;j++)
{
printf("%2d ",n);
n+=2;
}
printf("\n");
}
}