Advertisement
desislava_topuzakova

01. USD to BGN

Jun 7th, 2020
913
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.55 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Revision {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner (System.in);
  6.         //1. променлива за доларите (конзолата)
  7.         //2. 1 usd = 1.79549 BGN
  8.         //3. променлива за бг лева = долари * курс
  9.         //4. принтираме
  10.  
  11.         //тип, име, стойност
  12.         double usd = Double.parseDouble(scanner.nextLine());
  13.         double bgn = usd * 1.79549;
  14.         System.out.println(bgn);
  15.  
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement