Java Script
Зробити конвектор валют за допомогою switch

Ответы

Ответ дал: VivekGarg980
1

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);

   }

}

Вас заинтересует