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 // GlanzerChristoph.cpp // Autor: Christoph Glanzer #include #include using namespace std; void F(unsigned int i) { if (i == 0) ifm::forward(); else { F(i-1); ifm::right(20); F(i-1); ifm::left(25); } } int main() { int n = 0; std::cout << "N = ? "; std::cin >> n; F(n); ifm::right(45); F(n); ifm::right(45); F(n); ifm::left(90); F(n); ifm::left(90); F(n); ifm::right(45); F(n); ifm::right(90); F(n); ifm::left(45); F(n); F(n); return 0; }