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 : FlorianViher.cpp // Autor: Viher Florian // Lindenmayer Challenge #include #include // POST: the word w_i^F is drawn void f (const unsigned int i) { if (i == 0) ifm::forward(); else { f(i-1); ifm::left(20); ifm::save(); ifm::left(70); f(i-1); ifm::left(10); ifm::forward(); ifm::left(30); f(i-1); ifm::left(15); f(i-1); ifm:: restore(); ifm::left(23); } } int main () { std::cout << "Number of iterations =? "; unsigned int n; std::cin >> n; // draw w_n = w_n(F) f(n); return 0; }