Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class EbayCalculator {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- double winningBid = input.nextDouble();
- System.out.print("How much was the winning bid? ");
- double cost = input.nextDouble();
- System.out.print("How much did you pay for the item originally? ");
- double shipping = input.nextDouble();
- System.out.print("How much will it cost you to ship the item? ");
- double ebayCharge = input.nextDouble();
- System.out.print("What's the percentage that ebay charges you? ");
- double paypalCharge = input.nextDouble();
- System.out.print("What's the percentage that paypal charges you? ");
- double netProfit = winningBid - cost - shipping - ebayCharge - paypalCharge;
- System.out.println("Your net profit is + netProfit");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement