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 - Skript-Aufgabe 127 // Programm: RickertJoel.cpp // Autor: Rickert Joel #include #include // POST: the word w_i^F is drawn void f (const unsigned int i) { if (i == 0) ifm::forward(); // F else { int a = 60; ifm::left(a); f(i-1); ifm::right(2*a); f(i-1); f(i-1); ifm::left(2*a); f(i-1); ifm::right(a); } } int main () { std::cout << "Number of iterations =? "; unsigned int n; std::cin >> n; f(n); return 0; }