write a program on bluej to add 12.7 and 20.6 . Also, subtract 20 from 23 . print answer
Answers
Answered by
2
Hi Friend,
Here is your answer...........
For Addition
public class Sum
{
public static void main (String args[])
{
float a=12.7;
float b=20.6;
int sum;
sum=a+b;
System.out.println("sum ="+sum);
}
}
For Substraction
public class Substraction
{
public static void main (String args[])
{
int a=20;
int b=23;
int sum;
sum=a+b;
System.out.println("sum ="+sum);
}
}
Hope it will be helpful to you............
Please!!! mark my answer as Brainliest............
Answered by
7
Answer:
Your answer is in the attachment
Attachments:
Similar questions