Computer Science, asked by madmonkeygaming001, 2 days ago

Java program for the sum of three given no.s 1,2,3​

Answers

Answered by onkarp310
0

Answer:

Java program for the sum of three given no.s 1,2,3

6

Answered by ElectricalCubed
0

Answer:

TO THE BEST OF MY KNOWLEDGE, THE ANSWER IS GIVEN BELOW

package com.adeepdrive.sorting;

import java.util.Scanner;

// Java-W3schools

public class SumThreeNumbers {

public static void main(String[] args) {

 int number1;

 int number2;

 int number3;

 Scanner scanner = new Scanner(System.in);

 System.out.println("Enter numner 1 :1 ");

 number1 = scanner.nextInt();

 System.out.println("Enter numner 2 :2 ");

 number2 = scanner.nextInt();

 System.out.println("Enter numner 3 :3 ");

 number3 = scanner.nextInt();

 int finalResult = number1 + number2 + number3;

 System.out.println("Final resut of sum of given three numbers is " + finalResult);

}

}

OUTPUT:

Enter numner 1 : 1

Enter numner 2 : 2

Enter numner 3 : 3

Final result of the sum of given three numbers is 6

Similar questions