to input any two numbers and print their sum and product
Answers
Answered by
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
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
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
{
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
Hindi,
8 months ago
Computer Science,
8 months ago
English,
8 months ago
Math,
1 year ago
Chemistry,
1 year ago
English,
1 year ago
Social Sciences,
1 year ago