Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 0:3f1c5a906dc0
- Child:
- 1:a388472c17f4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sat Apr 17 10:23:22 2021 +0000
@@ -0,0 +1,32 @@
+//Fibanocci
+
+#include "mbed.h"
+
+void Fibanocci(int N){
+ int i = 0;
+//Tried up to 50, but at 47, unsigned int number is overflowed showing negative result
+// so I changed to long long
+ unsigned long long j = 1;
+ unsigned long long k = 0;
+ unsigned long long fib = 0;
+ while (i<=N){
+ printf("Fibanocci(%d) = %lld\n", i, fib);
+ fib = j + k;
+ j = k;
+ k = fib;
+ i++;
+ }
+}
+
+int main()
+{
+
+ Fibanocci(50);
+
+
+ while(true) {
+
+ }
+
+
+}