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

## 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...*

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`

.

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

*Volume = 4/3...*