Write a java program to find the sum and difference between 25 and 16 using variables, in different lines.
Answers
Answer:
Please mark me brainliest! Here is your answer:
Explanation:
//program to find the sum and difference between two numbers
public class Example
{
public static void main(String args[])
{
int a=25,b=16;
System.out.println("The first number="+a);
System.out.println("The second number="+b);
double sum=a+b;
double difference=a-b;
System.out.println("The sum="+sum);
System.out.println("The difference="+difference);
}
}
Answer:
HERE IS YOUR ANSWER↓
Explanation:
class PROGRAM1
{
static void main()
{
int a = 25;
int b = 16;
int c = a+b;
int d = a-b;
System.out.println("THE SUM IS="+c);
System.out.println("THE DIFFERENCE="+d);
}
}