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 - challange Aufgabe 123 //Programm: KnorrNils.cpp //Autor: Nils Knorr #include #include void f(const unsigned int i) { if( i==0 ) ifm::forward(); else { f(i-1); ifm::right(70); ifm::forward(); f(i-1); ifm::right(70); ifm::forward(3); f(i-1); ifm::left(70); f(i-1); } } int main () { std::cout<< "give number of iterations n=? "; int unsigned n; std::cin >> n; //work with n number of iterations f(n); return 0; }