Question: how do you write this in dr. java? public void newResults() { 7/Declare an integer called twice //Declare a decimal variable called ave 1/Declare an
public void newResults() { 7/Declare an integer called twice //Declare a decimal variable called ave 1/Declare an integer called whoa 1/set twice to a doubled 1/set ave to the average of a and b. Make sure the answer is a decimal value 1/set whoa to ten times a plus b public class MathFun { // Insert all code by adding a line IMMEDIATELY below the comment describing what to do 7/Declare two integers, a and b public void init() { //Put the value 3 into variable a //Put the value 5 into variable b public void results() { //Declare an integer called sum //Declare an integer called prod //Declare an integer called diff //Declare an integer called remain //set sum as the sum of a and b //set prod as the product of a and b //set diff as b subtracted by a 7/set remain as the remainder of b divided by 2 public void newResults() { //Declare an integer called twice //Declare a decimal variable called ave //Declare an integer called whoa //set twice to a doubled 7/set ave to the average of a and b. Make sure the answer is a decimal value //set whoa to ten times a plus b public static void main(String[] args) { //this.init(); //this.results(); //this.newResults()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
