import java.io.*;
import java.util.*;
public class Accept {
public static void main(String args[]) throws IOException{
int k;
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter two integers numbers to perform arithmetic operation");
String str = br.readLine();
StringTokenizer st = new StringTokenizer(str," ");
String s1 = st.nextToken();
String s2 = st.nextToken();
int i = Integer.parseInt(s1);
int j = Integer.parseInt(s2);
System.out.println("The addition of the two numbers is " +(i+j));
System.out.println("The Subtraction of the two numbers is " +(i-j));
System.out.println("The Multiplication of the two numbers is " +(i*j));
System.out.println("The Division of the two numbers is " +(i/j));
}
}
import java.util.*;
public class Accept {
public static void main(String args[]) throws IOException{
int k;
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter two integers numbers to perform arithmetic operation");
String str = br.readLine();
StringTokenizer st = new StringTokenizer(str," ");
String s1 = st.nextToken();
String s2 = st.nextToken();
int i = Integer.parseInt(s1);
int j = Integer.parseInt(s2);
System.out.println("The addition of the two numbers is " +(i+j));
System.out.println("The Subtraction of the two numbers is " +(i-j));
System.out.println("The Multiplication of the two numbers is " +(i*j));
System.out.println("The Division of the two numbers is " +(i/j));
}
}
Output :-
Enter two integers numbers to perform arithmetic operation
20 5
The addition of the two numbers is 25
The Subtraction of the two numbers is 15
The Multiplication of the two numbers is 100
The Division of the two numbers is 4
No comments:
Post a Comment