// IFMP Serie 9 Aufgabe Challenge
// Programme: dancing_witches.cpp, with 7 iterations draws dancing witches
// Number of iterations: 7
// Author: Nicola Nesa, Gruppe I
#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(108);
f(i-1);
ifm::right(72);
f(i-1);
ifm::right(72);
f(i-1);
ifm::right(72);
f(i-1);
ifm::left(59);
f(i-1);
}
}
int main () {
std::cout << "Number of iterations =? ";
unsigned int n;
std::cin >> n;
for (int k=1; k<=1; ++k)
{
f(n);
ifm::left(360);
}
return 0;
}