Write a program in Java to show HCF and LCM of three numbers with Scanner
Answers
Answered by
3
Answer:
class lcmGCD. { public static void main(String args[])
{ int n1,n2; int gcd,lcm,remainder,numerator,denominator;
Scanner sc = new Scanner(System. in); System. ...
n2=sc. nextInt(); if (n1>n2) ...
numerator=n1; denominator=n2; }
else. { numerator=n2;
denominator=n1; } remainder=numerator%denominator;
while(remainder!=0)
Similar questions
India Languages,
3 months ago
World Languages,
3 months ago
English,
3 months ago
Science,
7 months ago
Social Sciences,
7 months ago
Hindi,
11 months ago
Hindi,
11 months ago