write a program which take a string give it permutations and combination should not repeat any letter
#include<conio.h>
#include<stdio.h>
#include<iostream.h>
#include<stdlib.H>
void main(void)
{
clrscr();
char a[3]
//cout<<"ent int "<<endl;
> //cin<<a;
atoi(a)
for(a=1;a<=3;a++)
{
for(b=1;b<=3;b++)
{
for(c=1;c<=3;c++)
{
cout<<a<<b<<c<<endl;
}
}
}
getch();
}
for example:
cat
cat
act
tac
tca
atc
cta