Department of Computer Science | Institute of Theoretical Computer Science | CADMO

Theory of Combinatorial Algorithms

Prof. Emo Welzl and Prof. Bernd Gärtner

// Informatik Extra Aufgabe // Program: BinzChristopher.cpp // Autor: Christopher Binz #include #include //Recursion function for drawing: go one step forward void f (const unsigned int i){ if (i == 0){ ifm::forward();} else{ f(i-1); ifm::left(45); f(i-1); ifm::right(120); f(i-1); } } int main (){ unsigned int n; std:: cout <<" Number of iterations n=? "; std:: cin >> n; f(n); return 0; }