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 // Autor: Franziska Strasser // Programm: StrasserFranziska.cpp // sieht am bessten aus fŸr 10 oder 11 Iterationen #include #include // POST: die Lindenmayer"blume" wird gezeichnet void f (const unsigned int i) { if (i == 0) ifm::forward(); else { f(i-1); ifm::left(10); ifm::save(); ifm::right(90); ifm::restore(); f(i-1); ifm::left(50); } } int main () { std::cout << "Anzahl von Iterationen =? "; unsigned int n; std::cin >> n; // zeichen der "Blume" f(n); return 0; }