For your homework, solve problem R4.8 parts a to d here: __https://www.lol-101.com/classrooms/intro-java-question-bank/primitive-types-reviews-and-exercises-easter-sunday-project__ (It's roughly halfway down the page.)

To see this working, head to your live site.

Search

kevinzhao183

Oct 11, 2020

# Intro to Java 10/10/20 Homework

Intro to Java 10/10/20 Homework

4 comments

6.25

6

12.5

-3

I couldn't figure out the last one

6.25

7

11.5

-3

a. 6.25

b. 6.5 c. 11.7

d. -3

class Main { public static void main(String[] args) { System.out.println("YAY! Solving Problems!"); double x = 2.5; double y = -1.5; int m = 18; int n = 4; System.out.println(x+n*y-(x+n)*y); System.out.println(m/n+m/n); System.out.println(5*x-n/5); System.out.println(1-(1-(1-(1-(1-n))))); System.out.println(Math.sqrt(Math.sqrt(n))); } }

6.25

8

12.5

-3

1.4142135623730951