Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import java.util.Scanner;
- public class CalculateDiscount {
- public static void main(String[] args) {
- Scanner user_input = new Scanner(System.in);
- int items =user_input.nextInt();
- double price=0.0;
- for (int i=0; i<items; i++) {
- double inputPrice = user_input.nextDouble();
- price = 0.35*inputPrice;
- System.out.printf("%.2f\n",price) ;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement