-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHw1prob11.java
More file actions
22 lines (16 loc) · 743 Bytes
/
Hw1prob11.java
File metadata and controls
22 lines (16 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//CSC110
//Professor Scheiman
//Jairo Molina
//Spring 2018
package hw1prob11;//DELETE THIS line if the program is not working.
import java.util.Scanner;//imports the java utility Scanner
public class Hw1prob11 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);//classifies Scanner utility under the variable scan.
double price;//creates a variable type double
System.out.println("Enter the retail price for each circuit board: ");//displays string
price = scan.nextDouble();//scans user input into price variable
double total = price * 0.4;//algorithm
System.out.println("Total profit made: "+total+"$");//displays string
}
}