For this problem, we'll round an `int`

value up to the next multiple of 10 if its rightmost digit is 5 or more, so 15 rounds up to 20....

# Search Results

Searching for: arithmetic operators

## Individual Exercises

We want make a package of `goal`

kilos of chocolate. We have small bars (1 kilo each) and big bars (5 kilos each). Return the number of...

Given an integer representing the radius of a sphere, compute and return the sphere's volume based on the following formula:

*Volume = 4/3...*

The `circuit()`

method is intended to take the distance a person has moved on a circuit (a track) and translate it into the position they...

Complete this method to return the sum of the two parameters.

Create a print line that sums variable a and variable b.

create a print line that will cast integer division m as an double.

Complete this method so it prints out the remainder of the two parameters.

Complete this method so it prints out the quotient of the two parameters.

Complete this method so it prints out the product of the two parameters.

Complete this method so it prints out the difference between the two parameters.

With the variables given to you, add the numbers together and store it in the variable called sum.

With the code given to you, create a new variable called `quotient`

that stores the `numerator`

divided by the `denominator`

and represented as...

With the variables given to you, calculate the remainder when the variable numerator is divided by the variable denominator and store the...

Given an input integer x for a math function defined by y = 3*(x^2) + 5 (three multiplied by the square of x plus five). The variable y...

Given three integers named first, second and third, write code that finds the average of the three numbers and that stores the result in...

Given a decimal number called `input`

, calculate the cube of this number. Store the result in the decimal variable called `myCube`

.

You are writing code using a jeroo named `jaime`

. Change the following if-then statement's condition so that `jaime`

will hop if there is a...

You are writing code using a jeroo named `jaime`

. Change the following if-then statement's condition so that `jaime`

will hop only if there...

You are writing code using a jeroo named `jaime`

. Change the following if-then statement's condition so that `jaime`

will hop only if there...

Given an integer representing the radius of a sphere, compute and return the sphere's volume based on the following formula:

*Volume = 4/3...*

For this question, we will be working with a subclass of Jeroo called CountingJeroo that tracks the number of hops it has peformed. You...

For this question, we will be working with a subclass of Jeroo called CountingJeroo that tracks the number of hops it has peformed. You...

For this question, we will be working with a subclass of Jeroo called CountingJeroo that tracks the number of hops it has peformed. You...

Write a program that prompts the user to login, and displays appropriate messages according to whether the details are correct, partially...