Computer Science, asked by Mahinyoosaf4429, 1 year ago

c program to find lcm of 3 numbers

Answers

Answered by chitransh29
0

Answer:

u dont know

Explanation:

Answered by skyfall63
4

The program is:

Include <stdio.h>

{

int lcm (int, int)

int main

{

Int a, b, c, l, k;

Printf (“enter any three integers”);

Scanf (“%d %d %d”, &a, &b ,&c);

If(a<b)

L= lcm (a,b);

Else  

L= lcm (b,a);

If (l>c)  

K=lcm (l,c)

Else

K=lcm (c,l);

Printf (“lcm of two integer is %d”, d)

Return 0;

}

Int lcm (int a, int b)

{

Int temp =a;

While (1)

{

If (temp % b==0 && temp% a==0)

Break;

Temp++;

}

Return temp;

}

Similar questions