Question: What is wrong with the following code segment if the numbers from 1 to 10 are meant to be output? int num = 0;

 What is wrong with the following code segment if the numbers from  

What is wrong with the following code segment if the numbers from 1 to 10 are meant to be output? int num = 0; while (num >10){ num = num + 1; System.out.println(num); }

Step by Step Solution

3.42 Rating (155 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The issue with the code segment is in the condition ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!