write a program to find the difference between the product and sum of two numbers
Answers
Answered by
0
Answer:
firstno = int(input("Enter a first number : "))
secondno=int(input("Entesecondnumber :"))
Sum = firstno + secondno
Product = firstno * secondno
print(Sum," is the sum of the given two numbers")
print(Product,"is the product of the two given numbers")
difference = Product - Sum
print(difference," is the difference between the product and sum of two numbers")
hope it helps ☺️
Answered by
0
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
Math,
2 months ago
English,
2 months ago
Social Sciences,
4 months ago
India Languages,
10 months ago
India Languages,
10 months ago