Advertisement
SUni2020

USDtoBGN_01

Feb 16th, 2020
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class USDtoBGN_01 {
  4.     public static void main(String[] args) {
  5.         //1. read input -> usd
  6.         //2. calculate bgn = usd * 1.79549
  7.         //3. print bgn -> 2 (digit)
  8.         Scanner scanner = new Scanner(System.in);
  9.         double usd = Double.parseDouble(scanner.nextLine());
  10.         double bgn = usd * 1.79549;
  11.         System.out.printf("%.2f", bgn);
  12.  
  13.  
  14.  
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement