write a program to accept any three letter word and print all the probable three letter combinations .
Answers
Answered by
0
Answer:
#include <stdio.h>
void main()
{
int i,j,k;
char str[10];
printf("Enter a three letter word");
scanf("%s",&str);
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
for(k=0;k<3;k++)
{
if((i!=j)&&(j!=k)&&(k!=i))
printf("%c%c%c\n",str[i],str[j],str[k]);
}
}
}
}
Similar questions