Answer:
#include<stdio.h>
#include<conio.h>
void main()
{
int m,i,a=0,b=1,c;
printf("Enter the value of m: ");
scanf("%d",&m);
printf("\nPrint the Fibonacci
numbers below:\n");
printf("%d",a);
for(i=2;i<=m;i++)
{
c=a+b;
printf("%4d",c);
b=a;
a=c;
}
getch();
}
Output
Enter the value of m: 10
Print the Fibonacci numbers below:
0 1 1
2 3 5
8 13 21
34