mharris Posted September 8, 2020 Share Posted September 8, 2020 Hey all, what is the logical error in this program. Need your help public class Exercise01_05{ public static void main(String[]arg){ System.out.println("(9.5 * 4.5 - 2.5 * 3)/(45.5 - 3.5)"); } } Link to comment Share on other sites More sharing options...
Ingolme Posted September 10, 2020 Share Posted September 10, 2020 Is this for homework? It's pretty obvious to me, but I wouldn't like to help you cheat at your homework, you wouldn't learn anything. A logical error is when the program compiles and runs just fine, but does not do what you want it to. To identify the logical error in your code, look at what the program is actually doing and compare it to what you want the program to do. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now