#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
clrscr();
char a[30], b[30];
int i,j,k,l=0;
gets(a);
printf("Enter the range:\n");
scanf("%d %d",&j,&k);
for(i=j-1;i<=k-1;++i)
{
b[l]=a[i];
++l;
}
b[l]='\0';
printf("Output:\n");
puts(b);
getch();
}
No comments:
Post a Comment