Ask Question

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);

}

+2
Answers (1)
  1. 12 August, 09:33
    0
    Sorry we chose 0 for the denominator
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Rewrite this method so that it avoids the use of a return statement: void divisionQuestion () { int x, y; x = (int) random (-10, 11); y = ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers