JAVA show the cube and squares of numbers 1-10 using a loop
By
Sergio45
in Programming
in Programming
Go to solution
Solved by Mr_KoKa,
I think there shouldn't be ; at the end of the line with for, and your loop condition number < 10 makes it from 1 to 9. Loop will execute only when number is less than 10 so 9 is ok but 10 is not less than ten, number <= 10 will do.
-
Featured Topics
-
Topics
-
0
-
aqarwaen29 ·
Posted in Storage Devices5 -
2
-
IR76 ·
Posted in Phones and Tablets10 -
2
-
4
-
SparkFox621 ·
Posted in Troubleshooting0 -
0
-
7
-
JJackson ·
Posted in Networking1
-
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