41 lines
561 B
C++
41 lines
561 B
C++
//Program Kombinantionen
|
|
|
|
#include <stdio.h>
|
|
#include <iostream.h>
|
|
#include <string.h>
|
|
|
|
//#define DEBUG
|
|
|
|
int n=0; // Anzahl Schleifen
|
|
|
|
char Eingabe[100];
|
|
char Ausgabe[100];
|
|
|
|
void ForS(char* theEingabe, int Ebene)
|
|
{
|
|
char i;
|
|
int k;
|
|
|
|
if (Ebene < n) {
|
|
for (i=0;i<strlen(theEingabe);i++){
|
|
Ausgabe[Ebene] = Eingabe[i];
|
|
ForS(Ebene+1);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
for(k=0;k<=n-1;k++){
|
|
cout << Ausgabe[k] ;
|
|
}
|
|
cout << endl;
|
|
}
|
|
}
|
|
|
|
void main(void)
|
|
{
|
|
cout << "Wort:";
|
|
cin >> Eingabe;
|
|
n = strlen(Eingabe) ;
|
|
ForS(Eingabe,0);
|
|
}
|