Given two integers, 'num1' and 'num2', write a program in Java that calculates the mean value. The program needs to print the result at the end. Please reorder the lines of the provided Java code to solve this problem.
Arithmetic operations
Mean calculator
Report a typo
Reorder lines using drag or arrows. Adjust indentation with left buttons
}
int num1 = 10, num2 = 5;
int sum = num1 + num2;
}
public class Main {
public static void main(String[] args) {
System.out.println("Average: " + avg);
double avg = sum / 2f;
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.