JAVA
java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import java.util.Scanner;
// I used this line to allow code to take user input, in this case will be automated by the code coach section
public class Hovercraft {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
// this line to define the input scanner
int unitSold = input.nextInt();
// this is actually the line where the code takes an integer as input
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;
// I crossed this line because unitSold is an input value as you saw above
//int unitIncome = (price - cost);
// I crossed this line you declared this but didn't use it
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run