What do you want to save?
Add Code snippet
New code examples
-
Java 2022-03-02 20:05:28
Java program find GCD and LCM of two numbers using euclid’s algorithm
import java.util.Scanner; public class GCDLCMEuclid { // gcd java void findGCD(long num1, long num2) { while(num2 > 0) { long temp = num2; num2 = num1 % num2; num1 = temp; } System.out.printl... Add solution -
Other 2021-09-15 15:04:02
Lcm of 2 numbers in c
// for finding lcm of 2 number . Can use this concept to find lcm of an array of number #include <stdio.h> int main() { int n1, n2, max; printf("Enter two positive integers: "); scanf("%d %d", &n1, &n2); ... Add solution