Assembly program to calculate nth element in fibonnacci series
Answers
Answered by
1
#include<studio.h>
#include<conio.h>
void main()
{
int a=-1;b=1;n;i;
printf("enter the value of n");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
int s=a+b ;
printf("%d",s);
a=b;
b=s;
}
getch();
}
#include<conio.h>
void main()
{
int a=-1;b=1;n;i;
printf("enter the value of n");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
int s=a+b ;
printf("%d",s);
a=b;
b=s;
}
getch();
}
HimanshuSingh11111:
Great, its correct
Similar questions
English,
7 months ago
Math,
7 months ago
Social Sciences,
7 months ago
Environmental Sciences,
1 year ago
Math,
1 year ago