write a c program to print the pattern



QUESTION:- 

write a c program to print the following pattern  

N E P A L 

N E P A 

N E P 

N E 

N 

  

#include <stdio.h>

#include <conio.h>

void main()

{

    char n[] = "NEPAL";

    for (int i = 5i >= 1i--)

    {

        for (int j = 0j < ij++)

        {

            printf("%c "n[j]);
        }

        printf("\n");

        getch();
    }
}

OUTPUT

N E P A L 

N E P A 

N E P 

N E 

Follow our page for regular updates.

0 Comments