Guest User

Untitled

a guest
Jan 3rd, 2019
639
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1.  
  2. import java.util.Scanner;
  3.  
  4. public class Telerik_34_CalculateDiscount {
  5.  
  6. public static void main(String[] args) {
  7.  
  8. Scanner sc = new Scanner(System.in);
  9.  
  10. int items = Integer.parseInt(sc.nextLine());
  11.  
  12. double disPrice=0.0;
  13.  
  14. for (int i=1; i<=items; i++) {
  15.  
  16. double price = Double.parseDouble(sc.nextLine());
  17.  
  18. disPrice = 0.35*price;
  19.  
  20. System.out.printf("\n%.2f",disPrice) ;
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment