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 - Aufgabe 127 //Programm: RyserAdrian.cpp //Autor: Adrian Ryser (Gruppe R) // fr 7 Iterationen geeignet #include #include void f (unsigned int i) { if(i==0) ifm::forward(); else { f(i-1); ifm::save(); ifm::left((i*60)%360); f(i-1); ifm::restore(); ifm::save(); ifm::left((i*30)%360); f(i-1); ifm::restore(); ifm::save(); ifm::right((i*60)%360); f(i-1); ifm::restore(); ifm::save(); ifm::right((i*30)%360); f(i-1);; ifm::restore(); f(i-1); } } int main () { std::cout<<"Numberof iteratios =?"; unsigned int n; std::cin>>n; f(n); return 0; }