answersLogoWhite

0


Best Answer

Based on gcd:

int LCM (int a, int b)

{

. int d= gcd (a, b);

. if (d==0) return 0;

. else return a/d*b;

}

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you make a LCM program in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How can you find the Lowest common denominator of four integers?

lcm(a,b,c,d) = lcm(lcm(a,b,c),d) = lcm(lcm(a,b),lcm(c,d))


What is the LCM of 6 7 and C?

If C is co-prime with 6 and with 7, then LCM(6, 7, C) = 42*C If not, the answer depends on the value of C.


How can you make C programming on i3i5 processors?

Use a program called visual studio express. Its made by Microsoft and you can program in all kinds of languages. C , C+ etc


How you can make c program of attendance record system?

how can create a attendece sheet in c language


How do you make an employee database in c program?

With lots of hard work.


What is the LCM of 8 and C and C?

That would depend on the value of C.


Write a c program to find LCM of two numbers using recursion?

#include<stdio.h> #include<conio.h> void lcm(int m,int n) { for(i=1;i++) { if(i%m==0&&i%n==0) return i; } } void main() { clrscr(); int a,b; a=19;b=20; printf("lcm is %d",lcm(a,b)); getch(); }


What is the LCM of C and A?

If they have no common factors other than 1, the LCM is their product.


What is the LCM of A B and C?

That depends on the values of A, B and C.


What does C mean in LCM?

The C stands for Common.


Is that possible to make programme in turbo c for a mini computer having dual core processor-?

Yes, to make a program in Turbo C for a mini computer to have a dual core processor.


C program was introduced in the year?

c program was introduced in the year 1972 by Dennis RitchieNo, it was the C language, not the C program.