#include <stdio.h>
#include <string.h>
int main()
{
int i,j,length;
char arr[] = "Programming";
length = strlen(arr);
for (i = length; i >= 0; i--)
{
printf("\n");
for (j = 0; j< i; j++)
{
printf("%c",arr[j]);
}
}
return 0;
}
#include <string.h>
int main()
{
int i,j,length;
char arr[] = "Programming";
length = strlen(arr);
for (i = length; i >= 0; i--)
{
printf("\n");
for (j = 0; j< i; j++)
{
printf("%c",arr[j]);
}
}
return 0;
}
Output:
Programming
Programmin
Programmi
Programm
Program
Progra
Progr
Prog
Pro
Pr
P
No comments:
Post a Comment