Advertisement
sunfresh

Untitled

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