JAVA show the cube and squares of numbers 1-10 using a loop
in Programming
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.
-
Topics
-
Arixl ·
Posted in New Builds and Planning2 -
Millios ·
Posted in New Builds and Planning18 -
torrtoise ·
Posted in Troubleshooting3 -
wxkin ·
Posted in New Builds and Planning3 -
Jacksonyoung ·
Posted in Troubleshooting3 -
Pandoroo ·
Posted in CPUs, Motherboards, and Memory3 -
5
-
13
-
remo233 ·
Posted in CPUs, Motherboards, and Memory5 -
RTX 3090 ·
Posted in Programs, Apps and Websites1
-
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