Write a program to find HCF and LCM two numbers
Answers
Answered by
0
Explanation:
C program to find hcf and lcm using function
long gcd(long, long);
int main() { long x, y, hcf, lcm;
printf("Enter two integers\n"); scanf("%ld%ld", &x, &y);
hcf = gcd(x, y); lcm = (x*y)/hcf;
printf("Greatest common divisor of %ld and %ld = %ld\n", x, y, hcf); ...
return 0; ...
long gcd(long x, long y) { ...
while (y != 0) {
Answered by
0
I misunderstood the question!
Similar questions