It is my fourth day in a high school robotics class, and we do not have a textbook because the internet.I am going to pick one up soon!
Until then, my homework is to "figure out" how to make this loop of Fibonacci numbers stop after 10 numbers in such a way that he could walk up, know nothing about Fibonacci numbers or anything, and just change the 10 to 20, 25, etc. I thought I could just make it so that while x is greater than 35 to stop, but then he changed the instructions from "just make it stop after 10" to that.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
int x = 0;
int y = 1;
void setup ( )
void loop ( )
He also said that if there's a more efficient way to code this, to do so and get the fewest lines of code possible.
Excuse me! He said that he wanted it to stop after the first 10 digits of the Fibonacci sequence, and he wanted to easily be able to change the number "10" to a different one to view that many numbers in the Fibonacci sequence.
I will try these suggestions! Thank you very much!