Code Scrappers


Even number Pyramid C program


              #include<stdio.h>
              #include<stdlib.h>

              void main()
              {
                  int i, j;

                  int n = 2;

                  for (i = 0; i < 5; i++)
                  {
                      n = 2;

                      for (j = 0; j <= i; j++)
                      {
                          printf("%d\t", n);

                          n = n + 2;
                      }

                      printf("\n");
                  }
              }


          



Output

        2
        2       4
        2       4       6
        2       4       6       8
        2       4       6       8       10