Question: Which of the following code segments will print all multiples of that are greater than and less than ? I. for ( int k =

Which of the following code segments will print all multiples of
that are greater than
and less than
?
I. for (int k =1; k <100; k++)
{
if (k %5==0)
{
System.out.print(k +"");
}
}
II. for (int k =1; k <100; k++)
{
if (k /5==0)
{
System.out.print(k +"");
}
}
III. int k =5;
while (k <100)
{
System.out.print(k +"");
k = k +5;
}
Responses
I only
I only
II only
II only
III only
III only
I and III
I and III
II and III

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!