* Write a Program to find the Sum of two Number by using java.
public class Addition {
public static void main(String[] args) {
int num1 = 10;
int num2 = 20;
System.out.println("Enter two numbers: " + num1+ " " + num2);
int sum = num1 + num2;
System.out.println("The sum is: " + sum);
}
}
output
Enter two numbers: 10 20 The sum is: 30
No comments:
Post a Comment