Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int totalItems, sellRank;
- double todayPrice, tmrPrice;
- Scanner sc = new Scanner(System.in);
- System.out.println("How many total are being sold? ");
- totalItems = sc.nextInt();
- System.out.println("What rank is the item?");
- sellRank = sc.nextInt();
- System.out.println("What was today's price of the item?");
- todayPrice = sc.nextInt();
- tmrPrice = todayPrice * (0.7 + (sellRank - 1) * (0.6 / totalItems));
- System.out.println("Tomorrow's price of your item will be " + tmrPrice);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement