write a program to generate 1st n fibonacci prime number
Answer Posted / subhabrato das
/*program to calculate lcm of 2 integers*/
#include"stdio.h"
#include"conio.h"
int lcm(int,int);
void main()
{
int a,b,lcm;
printf("Enter two integers...\n");
scanf("%d %d",&a,&b);
lcm=(a,b);
printf("\n\nLCM=%d",lcm);
}
int lcm(int a,int b)
{
int lcm;
int i=1;
while(1)
{
r=a*i;
if(r%b==0)
{
return r;
}
i++
}
}
| Is This Answer Correct ? | 6 Yes | 6 No |
Post New Answer View All Answers
Explain how do you generate random numbers in c?
How to write c functions that modify head pointer of a linked list?
how to introdu5ce my self in serco
Tell me is null always defined as 0(zero)?
How is a structure member accessed?
What is NULL pointer?
What is cohesion and coupling in c?
What are the advantages of the functions?
If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..
Can the curly brackets { } be used to enclose a single line of code?
List some applications of c programming language?
Explain main function in c?
Difference between goto, long jmp() and setjmp()?
What does %p mean c?
What is adt in c programming?