Question: Read integer inCount from input as the number of integers to be read next. Use a loop to read the remaining integers from input.
Read integer inCount from input as the number of integers to be read next. Use a loop to read the remaining integers from input. Output all integers on the same line, and surround each integer with square brackets. Lastly, end with a newline. Ex: If the input is: 4 80 70 65 90 then the output is: [80] [70] [65] [90] 1 import java.util.Scanner; 2 3 public class Square Brackets { 4 56789161 public static void main(String[] args) { Scanner scnr- new Scanner(System.in); int inCount; *Your code goes here "/ } 11 }
Step by Step Solution
There are 3 Steps involved in it
Heres a Java program that reads an integer to determine the co... View full answer
Get step-by-step solutions from verified subject matter experts
