Confused by hovercraft!!
I know I am not the only person to be confused by the Hovercraft problem! I am a bit confused by the question. I thought I had it worked out but have I over thought the problem with the code below or just got it completely wrong altogether? public class Hovercraft { public static void main(String[] args) { int cost = 2000000; // this is the cost of each hover craft to make int price = 3000000; // this is the price each hover craft is sold for int insurance = 1000000; // this is paid out each month int unitSold = 2; // this is how many are sold each month int unitIncome = (price - cost); // income per unit sold int monthIncome = (price * unitSold); // how much profit is made each month int monthOutgoing = (cost * unitSold) + insurance; // how much is spent each month if (monthIncome > monthOutgoing) { System.out.println("Profit"); } else if (monthOutgoing > monthIncome) { System.out.println("Loss"); } else { System.out.println("Broke even"); } } }