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

Theory of Combinatorial Algorithms

Prof. Emo Welzl and Prof. Bernd Gärtner

// Program: MerkleJonas2.cpp // Author: Jonas Merkle #include #include void x(unsigned int n){ if (n==0) ifm::forward(); else { for(int i=0;i<24;++i){ x(n-1); ifm::right(1);} ifm::left(90); x(n-1); ifm::left(45); x(n-1); ifm::right(90); ifm::forward(70); ifm::left(12); } } int main () { std::cout << "Number of iterations =? "; unsigned int n; std::cin >> n; // draw w_n = w_n^X x(n); return 0; }