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.
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
Comments
Leave a comment