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 // Program: GasserMichael.cpp // Michael Gasser (group Q) // n = 8 #include #include void f (const int i) { if (i == 0) ifm::forward(); // F else { f(i-1); // w_{i-1}^F ifm::save(); ifm::left(30); // + f(i-1); // w_{i-1}^F ifm::restore(); ifm::right(120); // + f(i-1); ifm::forward(); } } int main () { std::cout << "Number of iterations =? "; int n; std::cin >> n; //Drawing in Turtle graphics f(n); return 0; }