ridhn26
ridhn26 ridhn26
  • 07-06-2020
  • Computers and Technology
contestada

Rewrite this method so that it avoids the use of a return statement:
void divisionQuestion()
{
int x, y;
x = (int)random(-10, 11);
y = (int)random(-10, 11);
if (y == 0)
{
println("Sorry we chose 0 for the denominator");
return;
}
else
println(x + " divided by " + y + " is " + x / y);
}

Respuesta :

davidjizhao
davidjizhao davidjizhao
  • 07-06-2020
Sorry we chose 0 for the denominator
Answer Link

Otras preguntas

the chanleys drove 112 miles on 4 gallons of gas. at this rate how many miles will they drive on 8 gallons
Which is a generic term used to collectively describe hard disks, CDs, and flash drives? storage is a generic term used to collectively describe hard disks, CD
((az²)^4) ÷ a²z^8 Simplify to the simplest​ form
Which term does not characterize the changing role of women in the 1920s? A: flapper B: Protestant C: voter D: worker
The point-slope form of the equation of the line that passes through (–4, –3) and (12, 1) is y – 1 = (x – 12). What is the standard form of the equation for thi
A toy rocket is launched from a platform that is 48 feet high.
Multiply.................
Write (-4)x(-5) ^5 as a product of powers
Who is henry clerval?
will give brainliest to the one who gets it right