//Name: Young Ban
// YoungBan.cpp
// n= 6,5,4
#include
#include
// Draw stars
void f (const unsigned int i) {
if (i ==0)
;
else {
f(i-1);
ifm::left(36);
ifm::forward(50);
f(i-1);
ifm::left(144);
ifm::forward(50);
f(i-1);
ifm::left(144);
ifm::forward(50);
f(i-1);
ifm::left(144);
ifm::forward(50);
f(i-1);
ifm::left(144);
ifm::forward(50);
ifm::left(108);
}
}
int main(){
std::cout <<"The best number of iterations is 6 - Please type in the number of iterations=?";
unsigned int n;
std::cin >> n;
//Draw
f(n);
ifm::left(72);
ifm::forward(5);
f(n);
ifm::left(72);
ifm::forward(5);
f(n);
ifm::left(72);
ifm::forward(5);
f(n);
ifm::left(72);
ifm::forward(5);
f(n);
}