I'll show some work here.
-Calculate the Nth term of the Fiboncci sequence is given by the recurrence relation:
U1=1 ; U2=1 ; UN=U(N-1) + U(N-2) ; For N>2.
-Determine the rank N and the value of A maximum term that can be used to calculate if UN :
a)Type int
b)Type long
c)Type dua
d)Type long double.
My Work in the first part;
#include<stdio.h>
main()
{
int UN,N;
int U1=1;
int U2=1;
for(N=2;N<=3;N++)
{
UN=U(N-1) + U(N-2);
printf(The sequence is UN=%d\n",UN)
}
}
Well, I'm first engineering student I have no idea why they teach us programming.
Any help will be greatly appreciated.
Thanks
Bookmarks