Write a Java program to calculate these:
num1 = 10num2 = 5sum = num1 + num2difference = num1 - num2product = num1 * num2quotient = num1 / num2System.out.println().Example Output:
Sum: 15 Difference: 5 Product: 50 Quotient: 2
Write a Java program that does this sequence:
num1 = 2 and num2 = 3.num3 = num1 + num2.num4 = num3 * 2.num3 and num4 using System.out.println().This shows sequencing: each step depends on the previous one.
a = 8, b = 4, c = 2.result1 = a + b * cresult2 = (a + b) * cresult1 and result2 using System.out.println().This helps practice order of operations.