-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHw1prob16.java
More file actions
26 lines (21 loc) · 1.21 KB
/
Hw1prob16.java
File metadata and controls
26 lines (21 loc) · 1.21 KB
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
//CSC110
//Professor Scheiman
//Jairo Molina
//Spring 2018
package hw1prob16;//DELETE THIS line if the program is not working.
import java.util.Scanner;//imports the java utility Scanner
public class Hw1prob16 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);//classifies Scanner utility under the variable scan.
double totalSurveyed = 12467;//creates variable type double
double oneOrmore = .14;//creates variable type double
double citrustFlavor = .64;//creates variable type double
double aproxNumber = totalSurveyed*.14;//creates variable type double
double aproxNumber1 = totalSurveyed*.64;//creates variable type double
System.out.println("Approximate number of customers in the survey"////////////////////
+"\nthat purchase one or more energy drinks per week" + "\nTotal is: "+aproxNumber);////
System.out.println("");/////////////////////////////////////FINAL TOTAL//////////////////
System.out.println("Approximate number of customers in the survey"///////////////////////
+"\nthat prefer citrust flavored drinks." + "\nTotal is: "+aproxNumber1);////////////////////
}
}