Write a program using Java Language to generate the sum of three different numbers.
Answers
Answered by
6
Answer:
import java.util.Scanner;
class SumOfThreeNumbers{
public static void main(String args[]){
int num1,num2,num3,result;
System.out.println("Enter any 3 integers ");
Scanner in = new Scanner(System.in);
num1 = in.nextInt();
num2 = in.nextInt();
num3 = in.nextInt();
result=num1+num2+num3;
System.out.println("The result after addition is "+result);
}
Explanation:
hope it helps dear............
Similar questions
English,
2 months ago
English,
2 months ago
Political Science,
2 months ago
Math,
5 months ago
Physics,
10 months ago
Social Sciences,
10 months ago
Science,
10 months ago