1 package expressions; 2 3 import java.util.OptionalDouble; 4 5 public class ExpressionsThing { 6 public static void main(String[] args) { 7 // Task 3 lab 4 8 double one = 3.14*5+5; 9 System.out.println("one = " + one); 10 double two = 3.14*(5+5); 11 System.out.println("two = " + two); 12 double three = (3.14*(5+5)); 13 System.out.println("three = "+ three); 14 // Task 4 15 int four = (2*3); 16 System.out.println("four = " + four); 17 double five = (0.5*55); 18 System.out.println("five = " + five); 19 double six = (65./3.); 20 System.out.println("six = " + six); 21 double seven = (five+six); 22 System.out.println("seven = " + seven); 23 // Task 5 24 double eight = (3.14*(11.3*11.3)); 25 System.out.println("eight = " + eight); 26 double nine = (27.7*27.7); 27 System.out.println("nine = " + nine); 28 double ten = ((eight+nine)/2); 29 System.out.println("ten = " + ten); 30 double eleven = (.17*243.5); 31 System.out.println("eleven = " + eleven); 32 // Task 6 33 int twelve = (3/3); 34 System.out.println("twelve = " + twelve); 35 int thirteen = ((4*2)-7); 36 System.out.println("thirteen = " + thirteen); 37 int fourteen = ((9-(7+1))+3); 38 System.out.println("fourteen = " + fourteen); 39 int fifteen = (((8+4)-6)-(2/2)); 40 System.out.println("fifteen = " + fifteen); 41 } 42 43 } 44 45 46