
The title says it all, an example is (1,2) > 3

import java.util.*;
public class Calculate {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Num1: ");
int num1 = input.nextInt();
System.out.print("Num2: ");
int num2 = input.nextInt();
if (num1 > 0 && num2 > 0) {
int sum = num1 + num2;
System.out.println("Sum= " + sum);
}
else {
System.out.println("Invalid Numbers");
System.out.println("End of program");
}
}
}

with java
Write a program to get student grade for 3 different subjects, and display the CGPA for them.
Write a program to read 8 integer numbers from user, put them into 2 matrix A and B(2 by 2), and multiply the matrix and display the result.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.