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

Theory of Combinatorial Algorithms

Prof. Emo Welzl and Prof. Bernd Gärtner

//Informatik: Serie - Serie 11- Aufgabe 127 //Program: DeMariaDaniele.cpp //Autor: Daniele De Maria #include #include void y (const unsigned int i); void x (const unsigned int i){ if (i > 0){ x(i-1); ifm::left(45); ifm::forward(4); y(i-1); ifm::left(45); ifm::forward(); ifm::left(45); ifm::forward(); ifm::left(45); ifm::forward(); ifm::left(45); ifm::forward(); ifm::right(90); ifm::forward(); ifm::left(45); ifm::forward(); ifm::left(45); ifm::forward(); ifm::left(45); ifm::forward(); ifm::left(45); ifm::forward(3); y(i-1); ifm::forward(); ifm::left(225); } } void y (const unsigned int i){ if (i > 0){ x(i-1); } } int main () { std::cout << "Number of iterations =? "; unsigned int n; std::cin >> n;// n = 15 x(n); return 0; }