Advertisement
GabrielHr00

01. USD to BGN

Jan 5th, 2025
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class USDToBGN {
  4.  
  5.     public static void main(String[] args) {
  6.         // 1 USD = 1.79549 BGN
  7.  
  8.         Scanner scanner = new Scanner(System.in);
  9.         String input = scanner.nextLine();
  10.  
  11.         double usd = Double.parseDouble(input);
  12.         double bgn = usd * 1.79549;
  13.  
  14.         System.out.println(bgn);
  15.     }
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement