4 10 Pts Show Printed Following Program Assume Data Values Shown Typed One Time Response P Q43843855
4. (10 pts) Show what is printed by the following program. Assume that the data values shown are typed in, one at a time, in response to the prompts: 4 13 10 5 1 /* problem 4 */ import java.util.Scanner; public class problem4 { public static void main(String[] args) { int a=0, b=0, c=1, amt%3D0%; Scanner inp = new Scanner(System.in); while (c <= b= 7; System.out.print(“type in a number: “); a = inp.nextInt(); if (a <7) b-= 1; 5) { else amt = amt + 2 * a; System.out.println (c + c++; + amt); “+b+” “+a +” 11 System.out.println (c + ” “+b+ ” “+a+” “+ amt); inp.close(); Show transcribed image text 4. (10 pts) Show what is printed by the following program. Assume that the data values shown are typed in, one at a time, in response to the prompts: 4 13 10 5 1 /* problem 4 */ import java.util.Scanner; public class problem4 { public static void main(String[] args) { int a=0, b=0, c=1, amt%3D0%; Scanner inp = new Scanner(System.in); while (c
Expert Answer
Answer to 4. (10 pts) Show what is printed by the following program. Assume that the data values shown are typed in, one at a time…
OR