// Author: Timo Welti
// Prog: WeltiTimo3.cpp
#include
#include
void f (const unsigned int i) {
if (i == 0)
ifm::forward();
else {
f(i-1);
ifm::right(108);
f(i-1);
ifm::left(72);
f(i-1);
ifm::left(72);
f(i-1);
ifm::left(72);
f(i-1);
ifm::right(108);
}
}
int main () {
std::cout << "Number of iterations (smaller than 9, otherwise computation will take too long) =? ";
unsigned int n;
std::cin >> n;
f(n);
ifm::left(72);
f(n);
ifm::left(72);
f(n);
ifm::left(72);
f(n);
ifm::left(72);
f(n);
ifm::left(72);
return 0;
}