// 1
#include <stdio.h>
int fibo(int);
int main()
{
int n, i = 0, c, num=0, f;
int arr[100];
printf("How many? ");
scanf("%d",&n);
printf("\nFibonacci\n");
for (c=1; c<=n; c++)
{
printf("%d ", fibo(i));
arr[num]=fibo(i);
i++;
num++;
}
printf("\n\nArray\n");
for (f=0; f<=n-1; f++)
{
printf("%d ", arr[f]);
}
return 0;
}
int fibo(int n)
{
if (n==0)
return 0;
else if (n==1)
return 1;
else
return (fibo(n-1)+fibo(n-2));
}
// 2
#include <stdio.h>
int main()
{
int n;
int k=0;
int c=0;
int max=0;
printf("Array Size: ");
scanf("%d", &n);
int a[n];
printf("\nType %d values: ", n);
for (; k<n; k++){
scanf("%d",&a[k]);
}
for (; c<=4; c++){
if (a[c]>=max)
max=a[c];
}
printf("\nMax is %d", max);
return 0;
}