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 // Program: HattTobias.cpp // Autor: Tobias Hatt #include #include // x und y ruft sich gegenseitig auf void y (const unsigned int i); // POST: w_i^X void x (const unsigned int i) { if (i > 0) { x(i-1); // w_{i-1}^X ifm::left(199); // + y(i-1); // w_{i-1}^Y ifm::forward(); // F ifm::left(5); // + } } // POST: w_i^Y void y (const unsigned int i) { if (i > 0) { ifm::right(179); // - ifm::forward(); // F x(i-1); // w_{i-1}^X ifm::right(3); // - y(i-1); // w_{i-1}^Y } } int main () { std::cout << "Wie viele Iterationen =? "; unsigned int n; std::cin >> n; // draw w_n = w_n^X x(n); return 0; }