Question

int b = 4, p = 5, r = 2, v = 8; double x; Write...

int b = 4, p = 5, r = 2, v = 8;

double x;

Write the JAVA statement to perform the following: Assign x the value of p multiplied by v - 6 all divided by the square root of the sum of b and p

Homework Answers

Answer #1
// TestCode.java
public class TestCode {
    public static void main(String args[])
    {
        int b = 4, p = 5, r = 2, v = 8;
        double x;

        // Assign x the value of p multiplied by v - 6 all divided by the square root of the sum of b and p
        x = (p*(v-6))/(Math.sqrt(b+p));

        System.out.println(x);
    }
}

3.3333333333333335

x = (p*(v-6))/(Math.sqrt(b+p));
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write a public static method name productAll that takes in 2 arguments int a, int b,...
Write a public static method name productAll that takes in 2 arguments int a, int b, and returns the product of all values between those two numbers inclusive. Remember a can be less than b, b might be less than a, or they may be equal. They can also be positive or negative. Example: productAll(2, 5); int returned by method: 120 Example: productAll(5, 2); int returned by method: 120 Example: productAll(3, 3); int returned by method: 9 Example: productAll(3, 5);...
Write a public static method name productAll that takes in 2 arguments int a, int b,...
Write a public static method name productAll that takes in 2 arguments int a, int b, and returns the product of all values between those two numbers inclusive. Remember a can be less than b, b might be less than a, or they may be equal. They can also be positive or negative. Example: productAll(2, 5); int returned by method: 120 Example: productAll(5, 2); int returned by method: 120 Example: productAll(3, 3); int returned by method: 9 Example: productAll(3, 5);...
APPLIED STATISTICS 2 USE R CODE ! SHOW R CODE! Write a function to calculate the...
APPLIED STATISTICS 2 USE R CODE ! SHOW R CODE! Write a function to calculate the sum of cubes from 1 to n, but skip the multiple of 5. Say, if n=10, the result is 1^3+2^3+3^3+4^3+6^3+7^3+8^3+9^3. The input is the value of n, the output is the summation. (you need if statement to check whether a number is a multiple of 5.In R, a%%b is the remainder for a divided by b. So, we have 10%%5=0) APPLIED STATISTICS 2 USE...
2. Write the output matrix “v” t = [2:4]; k = [1:3]; v = t.*k –...
2. Write the output matrix “v” t = [2:4]; k = [1:3]; v = t.*k – k.^2 4. Given: D = [1 2 3 4 5 6 7 8 9] (3x3) . Which command will extract the submatrix [1 2 3 4 5 6] (2x3) ? a. D[1:2,1:3] b. D(1,2 ;1,3) c. [D(1:2),D(1:3)] d. D(1:2,1:3) 14. What will be the dimension of matrix B? B=[ones(3) zeros(3) rand(3); 2*eye(9)] 18. Find the value of “C” A=1:2:10; B=linspace(1,5,5); C = length(A)*B(2)+A(5)*B(3); 19....
evaluate each indefinite integral 4) \int -(2*csc^(2)2x)/(cot(2x)*\sqrt(cot^(2)2x-1)); u=cot2x 5)  \int (10x^(4))/(9+4x^(10)); u=2x^(5) 6) \int (20x^(3))/(\sqrt(25-25x^(8))) 7) \int...
evaluate each indefinite integral 4) \int -(2*csc^(2)2x)/(cot(2x)*\sqrt(cot^(2)2x-1)); u=cot2x 5)  \int (10x^(4))/(9+4x^(10)); u=2x^(5) 6) \int (20x^(3))/(\sqrt(25-25x^(8))) 7) \int (1)/(x\sqrt(25-(ln-2x)^(2)))
let A = {−4, 4, 5, 8} and B = {4, 5, 6} and define relations...
let A = {−4, 4, 5, 8} and B = {4, 5, 6} and define relations R and S from A to B as follows: For all elements (x in A , y in B) , x R y ⇔ |x| = |y| + 1 and x S y ⇔ x /y is an integer. 1. Find A X B and A intersect B. 2. Is the relation R reflexive ? Justify your answer.
Differentiate the function. a) f(x) = x5 − 4x + 5 b) h(x) = (x −...
Differentiate the function. a) f(x) = x5 − 4x + 5 b) h(x) = (x − 5)(4x + 13) c) B(y) = cy−9 d) A(s) = −14/s^5 e) y = square root/x (x-8) f) y = 8x^2 + 2x + 6 / square root/x g) g(u) = square root/6u + square root/5u h) H(x) = (x + x^−1)^3
Give the numerical value of these expressions. a) P(X > 4) if X~Binomial(8, 0.65). b) P(5...
Give the numerical value of these expressions. a) P(X > 4) if X~Binomial(8, 0.65). b) P(5 < X ≤ 7) if X~Binomial(8, 0.65). c) P(X > 3) if X~Poisson(7.8)
****SHOW ALL WORK**** 1. Solve for x: -8 ≤ 3x - 5 2 a. Re-write in...
****SHOW ALL WORK**** 1. Solve for x: -8 ≤ 3x - 5 2 a. Re-write in equivalent exponential form: log2 64 = 6 b. Find x to four decimal places: log x = 3.0832 3. Perform: [ 6 2 ] [ 1 1 ] [ 2 4 ] - [ 1 -1 ] = 4. Calculate the following: a. Jane wants to create a password for one of her Internet accounts using some portion of her street name, which is...
5) Write a java program with scanner object to input first number and second number as...
5) Write a java program with scanner object to input first number and second number as variable with input statement and system out print statement. Steps: 1) Declare scanner object 2) Ask system out print for first number and declare variable first number 3) Ask system out print for second number and declare variable second number 4) Declare first for loop where variable int i has already a value (your choice), that i is less then equal to ? and...