(Compute expressions) Write a program that displays the result of
9.5 * 4.5 - 2.5 * 3
45.5 - 3.5
Answer
/
**
Program - 05
Write a program that displays the result of
9.5 * 4.5 - 2.5 * 3
--------------------
45.5 - 3.5
**/
public class HelloWorld
{
public static void main(String args[])
{
System.out.println((9.5 * 4.5 - 2.5 * 3)/(45.5 - 3.5));
}
}
OUTPUT
0.8392857142857143
If you have any doubts or questions, please let me know.