1
1 2
3 5 8
13 21 34 55
89 144 233 377 610
#include<stdio.h>
int fib(int);
int main()
{
int i,j,k=1;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("%d ",fib(k++));
}
printf("\n");
}
return 0;
}
int fib(int n)
{
if(n<=1)
return n;
return(fib(n-1)+fib(n-2));
}
Related Links:
- More Number Pattern Programs
- Star Pattern Programs in C
- Alphabet Pattern Programs in C
- Series Programs in C
Please Solve this pattern using while loop.
ReplyDeleteOaganZgreste Kimberly Baloi https://marketplace.visualstudio.com/items?itemName=4cialuforto.Solar-Rogue-gratuita
ReplyDeleteguivanfucu
MtrahisXgani Christopher Chartier click
ReplyDeletesetideli
Msyngliaperf-zo Karen Rogers click here
ReplyDeleteclick here
click here
https://colab.research.google.com/drive/1Di8npAsaerNHehq06gekWDn0MB4LBgz_
perbenonovs