Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double n = Double.parseDouble(scanner.nextLine());
- double minSum = 0;
- double discount = 0;
- for (int i = 1; i <= n; i++) {
- double current = Double.parseDouble(scanner.nextLine());
- minSum = current * 0.65;
- discount = current - minSum;
- System.out.printf("%.2f%n", discount);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement