Write a program to find the sum of 12.7 and 20.6 . Also, subtract 20 from 23. Print result.
Answers
Answered by
24
Answer:
<Program written in BlueJ Java Editor>
public class Brainly
{
public static void main(String args[])
{
double a,b,c,d,add,subtract;
a=12.7;
b=20.6;
c=23;
d=20;
add=a+b;
subtract=c-d;
System.out.println("Number 1="+a);
System.out.println("Number 2="+b);
System.out.println("Number 3="+c);
System.out.println("Number 4="+d);
System.out.println("Number 1 + Number 2="+add);
System.out.println("Number 3 - Number 4="+subtract);
}
}
||Please Mark Me as Brainliest||
Similar questions