Computer Science, asked by ashish253, 1 year ago

to input any two numbers and print their sum and product

Answers

Answered by shardul1925
0
CLS
INPUT"ENTER ANY TWO NUMBER ";A,B
PRINT"THE SUM OF THAT NUMBERS IS";A+B
PRINT"THE PRODUCT OF THAT NUMBERS IS ";
A*B
END
Answered by Anonymous
0
class Sum_product
{
public void input(int a,int b)
{
int sum=0; pro=0;
sum = a+b;
pro = a*b;
System.out.println('sum of numbers is" + sum);
System.out.println("product of numbers is" + pro);
}
}

here variable sum for sum of numbers and pro for product of numbers 
                      a and b for taking two numbers from user
Similar questions