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

Theory of Combinatorial Algorithms

Prof. Emo Welzl and Prof. Bernd Gärtner

// Prog: SmirnowAlex2.cpp // Lindenmayer Challenge #include #include void g (const unsigned int i) { if (i == 0) ifm::forward(); else { for(int a=0; a<=360;++a) { ifm::forward(2000); ifm::left(1); } g(i-1); } } int main () { std::cout << "Number of iterations =? (best with n=50) "; unsigned int n; std::cin >> n; // draw for (int a=n; a>0; --a) { g(a); ifm::forward(100000); } return 0; }