WAP to input two numbers and print their sum subract multiply and division . display the operation result
Answers
Answer:
Wireless Application Protocol (WAP) is a technical standard for accessing information over a mobile wireless network. A WAP browser is a web browser for mobile devices such as mobile phones that use the protocol.
if you are pleased with answer in turn
please subscribe my youtube chanel(Ramakrishna Nallangari youtube channel) for my effort
search for
Ramakrishna Nallangari in search box
of youtube
Answer:
public class AITRH_OPR {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
System.out.println("ENTER THE FIRST NUMBER");
int n1=sc.nextInt();
System.out.println("ENTER THE SECOND NUMBER");
int n2= sc.nextInt();
int sum=0, multiply=0,subtract=0, division=0;
sum=n2+n1;
System.out.println("THE SUM OF THE TWO NUMBERS IS "+sum);
subtract =(n2-n1);
if(subtract<0){
subtract=n1-n2;
System.out.println("THE SUBTRACTION OF THE TWO NUMBERS IS "+subtract);
}
else {
System.out.println("THE SUBTRACTION OF THE TWO NUMBERS IS "+subtract);
}
multiply=n1*n2;
System.out.println("THE MULTIPLICATION OF THE TWO NUMBERS IS "+multiply);
division = n1/n2;
System.out.println("THE DIVISION OF THE TWO NUMBERS IS "+division);
}
}
Explanation: