Question: I am trying to trace this problem and getting the incorrect output. If you provide an answer could you also include a detailed description of
I am trying to trace this problem and getting the incorrect output. If you provide an answer could you also include a detailed description of how to properly trace this? cheers.

import java.util.Scanner; public class BreakAndContinue { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); int result; int stop; int a; int b; Input 18 stop = scnr.nextInt(); result = 0; Output for (a = 3; a stop) { break; 3 7 12 } if (result > stop) { break; ) )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
