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);
- int n = scanner.nextInt();
- double discount = 0.65;
- for (int i = 0; i < n; i++) {
- double item = scanner.nextDouble();
- discount = item * discount;
- item = item - discount;
- System.out.printf("%.2f%n", item);
- discount = 0.65;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement