TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Arithmetic Operations in Java
Krishna Rajput Singh
May 13
2015
Code
1.3
k
0
1
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
Write a java program
import
java.util.Scanner;
class
Allmath
{
public
static
void
main(String[] args)
{
int
number1, number2, sum, substract, multiplication, division;
System.out.println(
"Enter an Interger Number1"
);
Scanner in =
new
Scanner(System. in );
number1 = in .nextInt();
System.out.println(
"Enter an Integer Number2"
);
number2 = in .nextInt();
sum = number1 + number2;
System.out.println(
"Sum of Two Numbers Is\t"
+ sum);
substract = number1 - number2;
System.out.println(
"Substract of Two Numbers Is\t"
+ substract);
multiplication = number1 * number2;
System.out.println(
"multiplication of Two Numbers Is\t"
+ multiplication);
division = number1 / number2;
System.out.println(
"Division of Two Numbers Is\t"
+ division);
System.out.println(
"Enter The cls for clear screen"
);
}
}
Java
Adding Number
Multiplication two Numbers