Simple java program that will add two decimal numbers x and y, then divided by the whole number z.?
Answers
Answered by
0
Explanation:
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import java.util.Scanner;
class Add
{
public static void main(String[] arg)
{
int a,b;
Scanner sc=new Scanner(System.in);
System.out.println("Enter first number");
a=sc.nextInt();
System.out.println("Enter second number");
b=sc.nextInt();
int c=a+b;
System.out.println("Addition of two numbers is : "+c);
}
}
Answered by
1
Java program for Addition, Subtraction, Multiplication and Division. Here we will discuss the most common mathematical operations such as addition, subtraction, multiplication and division In java. The compiler has been added as well so that you can execute the programs yourself, along with suitable examples and sample outputs.
Attachments:
Similar questions