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
Can math operations be performed on a void pointer?
Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1
Write a function that will take in a phone number and output all possible alphabetical combinations
A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(
Explain output of printf("Hello World"-'A'+'B'); ?
Explain what is the heap?
What is a shell structure examples?
Explain #pragma statements.
What is scope rule in c?
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?
Which node is more powerful and can handle local information processing or graphics processing?
How many header files are in c?
How can a program be made to print the name of a source file where an error occurs?
How can a number be converted to a string?
What is variable initialization and why is it important?