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

Theory of Combinatorial Algorithms

Prof. Emo Welzl and Prof. Bernd Gärtner

// Program: CajratiAusano.cpp // lindermayersytems #include #include void f (const unsigned int i) { if (i == 0) ifm::forward(); // F else { ifm::forward(); ifm::left(); f(i-1); ifm::forward(); ifm::right(); f(i-1); ifm::right(); if (i==3) { ifm::forward(); ifm::left(30); f(i-1); ifm::forward(); ifm::right(100); f(i-1); ifm::right(); } } } int main () { std::cout << "Number of iterations =? "; unsigned int n; std::cin >> n; f(n); return 0; }