initial checkin from subversion

This commit is contained in:
Tretter
2017-02-07 20:07:34 +00:00
commit 1268221411
9 changed files with 717 additions and 0 deletions

40
kombinationen.cc Normal file
View File

@@ -0,0 +1,40 @@
//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);
}