John Curran
/
Lab2_functionsandrecursivefunctions_JohnCurran_T00214119
Lab Question 2 Functions & recursive functions
main.cpp
- Committer:
- johnc89
- Date:
- 2021-04-17
- Revision:
- 0:c87e6041f68f
- Child:
- 1:25616f0791d2
File content as of revision 0:c87e6041f68f:
// Lab 2: Functions and recursive actions // John Curran T00214119 #include "mbed.h" Serial pc(USBTX,USBRX);// serial communications int j=1, k=0, fib =0; int N = 10 ; int main() { for (int count = 0; count < N; count ++ ) { pc.printf (" %d, ",fib); fib = k+j; k=j; j=fib; } }