You are on page 1of 1

/*A program to generate the pattern 'PROGRAMMING' by initializing string at first

PROGRAMMING
PROGRAMMIN
PROGRAMMI
PROGRAMM
PROGRAM
PROGRA
PROGR
PROG
PRO
PR
P */
#include<stdio.h>
#include<string.h>
int main()
{
int i,length,j;
char a[]="PROGRAMMING";
length=strlen(a);
for(i=length;i>=0;i--)
{
for(j=0;j<i;j++)
{
printf("%c",a[j]);
}
printf("\n");
}
return 0;
}

You might also like