#include(conio.h)
int main( )
{
char ch1, ch2, ch3;
clrscr( );
for(ch1='A' ; ch1<='C' ; ++ch1)
{
for(ch2='A' ; ch2<='C' ; ++ch2)
for(ch3='A' ; ch3<='C' ; ++ch3)
printf(" %c %c %c", ch1, ch2, ch3);
}
getch( );
return 0;
}
Output:-
AAA AAB AAC ABA ABB ABC ACA ACB ACC
BAA BAB BAC BBA BBB BBC BCA BCB BCC
CAA CAB CAC CBA CBB CBC CCA CCB CCC
No comments:
Post a Comment