English, asked by mithubarman562, 5 months ago

write a program to find the difference between the product and sum of two numbers​

Answers

Answered by Anonymous
1

import.java.util.*;

public class Difference

{

⠀⠀public static void main (String args [])

⠀⠀{

⠀⠀Scanner in = new scanner(System.in);

⠀⠀int a ,b , d;

⠀⠀System.out.println("enter the two numbers:");

⠀⠀a = in.nextInt();

⠀⠀b = in.nextInt();

⠀⠀d = ((a*b) - (a+b));

⠀⠀System.out.println("Difference between =" +d);

⠀⠀}

}

Similar questions