WAP to input two no.s . Find out their addition and product.
Answers
Answered by
1
Answer:
import java. util. Scanner;
public class expression
{
public static void main ()
{
Scanner in= new Scanner (System. in );
System.out.println(" enter any two numbers of your choice");
double a, b, sum, product;
a = in. nextDouble();
b = in. nextDouble();
sum = a + b;
product = a * b;
System.out.println(" sum of the entered numbers"+sum);
System.out.println(" product of the entered numbers"+product);
}
}
Similar questions