Write а program in Java
to input two integer or
floating point numbers and display the addition
Answers
Answered by
0
public static void main(String[] args) {
int first = 10;
int second = 20;
System.out.println("Enter two numbers: " + first + " " + second);
int sum = first + second;
System.out.println("The sum is: " + sum);
}
}
Similar questions
Computer Science,
5 months ago
Science,
5 months ago
Science,
5 months ago
Economy,
10 months ago
Political Science,
1 year ago
Economy,
1 year ago