import java.util.Scanner;
public class CurrencyConverter {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Введите сумму: ");
double amount = scanner.nextDouble();
System.out.print("Введите курс обмена: ");
double exchangeRate = scanner.nextDouble();
double convertedAmount = amount * exchangeRate;
System.out.println("Конвертированная сумма: " + convertedAmount);
}
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
import java.util.Scanner;
public class CurrencyConverter {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Введите сумму: ");
double amount = scanner.nextDouble();
System.out.print("Введите курс обмена: ");
double exchangeRate = scanner.nextDouble();
double convertedAmount = amount * exchangeRate;
System.out.println("Конвертированная сумма: " + convertedAmount);
}
}