// Informatik - Serie 11 - Challenge 125
// Program: RothNina3.cpp
// Author: Nina Roth
// Draws a (sort of) circle
#include
#include
// POST: the word w_i^F is drawn
void f (const unsigned int i) {
if (i == 0)
ifm::forward();
else {f(i-1);
ifm::left(144);
f(i-1);
ifm::right(126);
f(i-1);
ifm::left(144);
f(i-1);
ifm::right(126);
f(i-1);
ifm::left(144);
f(i-1);
ifm::right(126);
f(i-1);
ifm::left(144);
f(i-1);
ifm::right(126);
f(i-1);
ifm::left(144);
f(i-1);
ifm::right(126);
// +
}
}
int main () {
std::cout << "Number of iterations =? ";
unsigned int n;
std::cin >> n;
// draw w_n = w_n(F)
f(n);
return 0;
}