Department of Computer Science | Institute of Theoretical Computer Science | CADMO

Theory of Combinatorial Algorithms

Prof. Emo Welzl and Prof. Bernd Gärtner

//Informatik - Serie 11 - Aufgabe 127 //Programm: MeierMiriam.cpp //Autor: Miriam Meier(Gruppe G) #include #include // necessary: x and y call each other void y (const unsigned int i); // POST: w_i^X is drawn void x (const unsigned int i) { if (i > 0) { x(i-1); // w_{i-1}^X ifm::forward(); // F y(i-1); // w_{i-1}^Y ifm::left(30); // + ifm::forward(); // F } } // POST: w_i^Y is drawn void y (const unsigned int i) { if (i > 0) { ifm::forward(); // F ifm::left(30); // + y(i-1); // w_{i-1}^Y } } int main () { std::cout << "Number of iterations =? "; unsigned int n; std::cin >> n; // draw w_n = w_n^X x(n); return 0; }