Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7. int n = Integer.parseInt(scanner.nextLine());
  8.  
  9. for (int i = 0; i < n; i++) {
  10.  
  11. double number = Double.parseDouble(scanner.nextLine());
  12.  
  13. double discount = number - number * 0.65;
  14.  
  15. System.out.printf("%.2f%n",discount);
  16. }
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement