Question: challenge activity 3 . 9 . 1 : Enter the output of break and continue. 5 9 4 9 0 8 . 1 9 8

challenge activity
3.9.1: Enter the output of break and continue.
594908.1984044.qx3zqy7
Type the program's output
import java.util.Scanner;
public class BreakAndContinue {
public static void main(String [] args){
Scanner scnr = new Scanner(System.in);
int a;
int b;
int c;
a = scnr.nextInt();
b = scnr.nextInt();
c = scnr.nextInt();
while (a < b){
System.out.println(a);
if (a > c){
break;
}
a +=3;
}
}
}
Input
3
24
9
Output
1
2

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 Programming Questions!