Answer to Question #165567 in Java | JSP | JSF for Jessica Bond

Question #165567

Write a statement that assigns finalResult with the sum of num1 and num2, divided by 3. Ex: If num1 is 4 and num2 is 5, finalResult is 3.


1
Expert's answer
2021-02-21T20:02:57-0500

if you need a method:


public int finalResult(int num1, int num3){

return (num1+num2)/3;

}


or just


int num1 = 4;

int num2 = 5;

final int finalResult = (num1+num2)/3; //finalResult = 3


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog