Question: CHALLENGE 4.8.2: Nested loops: Print seats ACTIVITY Given numRows and numColumns, print a list of all seats in a theater. Rows are numbered, columns lettered,


CHALLENGE 4.8.2: Nested loops: Print seats ACTIVITY Given numRows and numColumns, print a list of all seats in a theater. Rows are numbered, columns lettered, as in 1A or 3E. Print a space after each seat, including after the last. Use separate print statements to print the row and column. Ex:numRows 2 and numColurmns 3 prints: 1A 1B 1C 2A 2B 2C 1 import java.util.scanner; 2 public class NestedLoops 3 public static void main (String args) scanner scnr new scanner(system.in); int numRows; int numcolumns int currentRow int currentColumn; char currentcolunnLetter Al lests pasar 18 numRoNs s.nextInt) numcolumns scnr. next Int(); 12 13 14 15 16 17 18 Your solution goes here System.out.printin( Run CHALLENE8.1: Nested loops: Indent text Print numbers 0, 1,2, userNum as shown, with each number indented by that number of spaces. For each printed line, print the leading spaces, then the number, and then a newline. Hint: Use i and j as loop variables (initialize i and j explicitly). Note: Avoid any other spaces like spaces after the printed number Ex: userNum = 3 prints. 1 import Java.util.scanner; 2 public class NestedLoop t 3 public static void main (String 4 1 teet args) I Scanner scnrnew Scanner(System.in) int userNum int i; int 5 All tests userNumscnr.nextInt); 10 12 13 14
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
