Mar

30

/*
HELLO
HELL
HEL
HE
H
*/

#include<stdio.h>
void main(){
char st[100];
char ch;
int i,j,k;
printf(“Enter a string: “);
gets(st);
for(i=0;st[i]!=’\0′;i++);
for(j=i-1;j>=0;j–){
for(k=0;k<=j;k++){
printf(“%c”,st[k]);
}
printf(“\n”);
}
}


Leave a Reply