#include<stdio.h>
int main(void)
{
int m, n, cnt=3;
int one, two, three;
while(1)
{
printf("Please Enter starting number : ");
scanf("%d", &m);
printf("Please Enter number for Fibonacci Series : ");
scanf("%d", &n);
if(m>0 && n>0)
{
break;
}
printf("Error..Input Again..\n\n");
}
printf("\n━━━━━━━━━━━━━━━━\n");
printf(" Term Number Fibonacci Series\n");
printf("━━━━━━┳━━━━━━━━━\n");
one = m;
two = one;
if(n==1)
{
printf("%7d ┃%10d\n", 1, one);
}
else if(n>=2)
{
printf("%7d ┃%10d\n", 1, one);
printf("%7d ┃%10d\n", 2, two);
}
while(cnt<=n)
{
three = one + two;
printf("%7d ┃%10d\n", cnt, three);
one = two;
two = three;
cnt++;
}
printf("━━━━━━┻━━━━━━━━━\n\n");
return 0;
}