Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a program to generate 1st n fibonacci prime number

Answer Posted / abdifatah mohiadin adam

void main()
{
int x1,x2,x3,n,i;
x1=0;
x2=1;
printf("enter a value for n : ");
scanf("%d",&n);
printf("%d %d ",x1,x2);
for(i=3;i<=n;i++)
{
x3=x1+x2;
printf("%d ",x3);
x1=x2;
x2=x3;
}
}

Is This Answer Correct ?    9 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do you know what are the properties of union in c?

1032


a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above

1356


What is the purpose of the statement: strcat (S2, S1)?

1127


Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

2007


What is difference between scanf and gets?

1210


How can you draw circles in C?

1113


Is there any data type in c with variable size?

1058


show how link list can be used to repersent the following polynomial i) 5x+2

2226


How are portions of a program disabled in demo versions?

1259


Explain #pragma statements.

998


What is the correct declaration of main?

1177


Why is c platform dependent?

1044


What is adt in c programming?

1122


Are there constructors in c?

984


if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.

5177