Number pattern

#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");
 }
}

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.