Advertisement
Guest User

Untitled

a guest
Jun 13th, 2018
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. int totalItems, sellRank;
  2. double todayPrice, tmrPrice;
  3. Scanner sc = new Scanner(System.in);
  4.  
  5. System.out.println("How many total are being sold? ");
  6. totalItems = sc.nextInt();
  7.  
  8. System.out.println("What rank is the item?");
  9. sellRank = sc.nextInt();
  10.  
  11. System.out.println("What was today's price of the item?");
  12. todayPrice = sc.nextInt();
  13.  
  14. tmrPrice = todayPrice * (0.7 + (sellRank - 1) * (0.6 / totalItems));
  15.  
  16. System.out.println("Tomorrow's price of your item will be " + tmrPrice);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement