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 = 5; i >= 1; i--)
{
for (int j = 0; j < i; j++)
{
printf("%c ", n[j]);
}
printf("\n");
getch();
}
}
OUTPUT
N E P A L
N E P A
N E P
N E
N
0 Comments