Evaluate an expression

Report a typo

Write a program that reads four double values a, b, c, d and then evaluates the following expression

a * 10.5 + b * 4.4 + (c + d) / 2.2

The program should output the result.

Sample Input 1:

1
2.5
0
4.4

Sample Output 1:

23.5
Write a program in Java 17
import java.util.Scanner;

class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// put your code here
}
}
___

Create a free account to access the full topic