veronikaaa86

02. Pounds to Dollars

Sep 21st, 2022
918
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.34 KB | None | 0 0
  1. package dataTypes;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class P02PoundsToDollars {
  6.     public static void main(String[] args) {
  7.         Scanner scanner = new Scanner(System.in);
  8.  
  9.         float pound = Float.parseFloat(scanner.nextLine());
  10.  
  11.         float dollars = pound * 1.36f;
  12.  
  13.         System.out.printf("%.3f", dollars);
  14.     }
  15. }
  16.  
Advertisement
Add Comment
Please, Sign In to add comment