# Programming Shortcut

## Monday, February 4, 2019

### Arithmetic Operation in Java Programming

Hello friends! Welcome to my website
How to make a java programming for basic arithmetic operation by the simple method?
This java language programming is free all type of errors like compiler and runtime errors and this programming is tested to compile and then run the programming code. only programming and noting
Here is only programming code only with the there output.

How to make basic arithmetic operation by simple method in java programming

//---- Code Start ----
import java.util.Scanner;

public class simplearithmetic {

public static void main(String[] args) {

//declaration of the variables and their types
int a, b, add, sub, multi, reminder, divistion;
//input
Scanner c = new Scanner(System.in);
System.out.print("Enter the frist number: ");
a = c.nextInt();
System.out.print("Enter The second number: ");
b = c.nextInt();
//opration logic
sub = a - b;
multi = a * b;
divistion = a / b;
reminder = a % b;
//output of the progrmming code
System.out.println("Airthmatic basic Oprtaion results:");
System.out.println(a + " + " + b + " = " + add);
System.out.println(a + " - " + b + " = " + sub);
System.out.println(a + " * " + b + " = " + multi);
System.out.println(a + " / " + b + " = " + divistion);
System.out.println(a + " % " + b + " = " + reminder);
}
}
//----code end-----

Output:    Enter the first number:8
Enter the second number:4
Arithmetic basic Operation result:
8 + 4 = 12
8 - 4 = 4
8 * 4 = 32
8 / 4 = 2
8 % 4 = 0

Note: Output of the Java programming depends on the input that entered by the Programmer

I make this programming and hope you are like the post if are you like the post you can please comment and Share the post to reach more people.