Created
May 2, 2025 15:06
-
-
Save gerryoregan1010/4dad393847da01e2eedbbff1050451c5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void funcFib(int max_num) { | |
Serial.print("funcFib:0,1,"); | |
int prevnum1 =0; | |
int prevnum2 =1; | |
int next_num =0; | |
for(int i=2; i<max_num; i++){ | |
next_num = prevnum1 + prevnum2; | |
prevnum1 = prevnum2; | |
prevnum2 = next_num; | |
Serial.print(next_num); | |
Serial.print("."); | |
} | |
Serial.println("!!!"); | |
} | |
void setup() { | |
delay(3000); | |
funcFib(26); | |
} | |
void loop() { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment