Write a program in java to input three integers and find their sum without using the mathematical operator +
Answers
Answered by
6
Answer:
Java Program to input three integers and find their sum without using the mathematical operator (+).
Explanation:
import java.util.Scanner;
public class Arithmetic {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int num1;
int num2;
int num3;
int sum
System.out.print(" Enter First Integer: ");
num1 = input.nextInt();
System.out.print("Enter Second Integer: ");
num2 = input.nextInt();
System.out.print("Enter Third Integer: ");
num3 = input.nextInt();
sum = num1 + num2 + num3;
System.out.println(sum);
Similar questions
Math,
5 months ago
Math,
5 months ago
Chemistry,
11 months ago
Computer Science,
11 months ago
Geography,
1 year ago
Social Sciences,
1 year ago
English,
1 year ago