Computer Science, asked by Knk1234, 4 months ago

4, How many times does the following loop work? Also write the output,
(Show steps of working)
public class Sample
public static void main()
int m=11, N=1,
while(m%n>0)
system.out.println(m#" *)

Answers

Answered by careenlyngdoh4
1

Explanation:

In for loops pre or post increment (i.e. -- or ++) of values doesn't affect the loop. This is not the case of while loops if the increment is done in the while portion of the loop. The following loop iterates exactly 10 times, printing the value of x from 10 to 1

Similar questions