import java.util.Scanner;
public class k1 {
public static void main (String... args) throws Exception {
final Scanner input = new Scanner(System.in);
double A = input.nextDouble();
double B = input.nextDouble();
if (Math.min(A, B) == B) {
double temp = A;
A = B;
B = temp;
}
System.out.println("A = " + A + ", B = " + B);
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
import java.util.Scanner;
public class k1 {
public static void main (String... args) throws Exception {
final Scanner input = new Scanner(System.in);
double A = input.nextDouble();
double B = input.nextDouble();
if (Math.min(A, B) == B) {
double temp = A;
A = B;
B = temp;
}
System.out.println("A = " + A + ", B = " + B);
}
}