1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
docker41 [41]
3 years ago
10

In Java; 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 numColumns = 3 prints:1A 1B 1C 2A 2B 2C import java.util.Scanner;public class NestedLoops {public static void main (String [] args) {Scanner scnr = new Scanner(System.in);int numRows;int numColumns;int currentRow;int currentColumn;char currentColumnLetter;numRows = scnr.nextInt();numColumns = scnr.nextInt();numColumns = currentColumnLetterfor(currentRow = 0; currentRow < numRows;currentRow++){for(currentColumn = =System.out.println("");}}
Computers and Technology
1 answer:
gtnhenbr [62]3 years ago
4 0

Answer:

The solution code is written in Java.

  1. import java.util.Scanner;
  2. public class Main {
  3.    public static void main(String[] args) {
  4.        String letters[] = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J"};
  5.        Scanner scnr = new Scanner(System.in);
  6.        int numRows;
  7.        int numColumns;
  8.        int currentRow;
  9.        int currentColumn;
  10.        numRows = scnr.nextInt();
  11.        numColumns = scnr.nextInt();
  12.        for(currentRow = 0; currentRow < numRows;currentRow++){
  13.            for(currentColumn =0; currentColumn < numColumns; currentColumn++)
  14.            {
  15.                System.out.print((currentRow + 1) + letters[currentColumn] + " ");
  16.            }
  17.        }
  18.    }
  19. }

Explanation:

Firstly, we need to create an array to hold a list of letters (Line 6). In this solution, only letters A - J are given for simplicity.

Next, we declare all the variables that we need, numRows, numColumns, currentRow and currentColumn (Line 8 - 11).

Next, we use Scanner object, scnr to prompt user to input integer for <em>numRows </em>and <em>numColumns </em>(Line 12-13).

At last, we use two-layer for loops to traverse through the number of rows and columns and print out the currentRow and currentColumn (Line 15-19). Please note the currentRow is added by 1 as the currentRow started with 0. To print the letter, we use currentColumn as an index to take out the letter from the array.

You might be interested in
You can filter the data based on certain specific conditions in Excel 2013 true or false​
Katena32 [7]

Answer:

False.

Explanation:

Microsoft Excel is a software application or program designed and developed by Microsoft Inc., for analyzing and visualizing spreadsheet documents.

Generally, workbooks are known as Microsoft Excel files. Excel workbook can be defined as a collection of one or more charts and worksheets (spreadsheets) used for data entry and storage in an excel file. In order to create a project on Excel you will have to use a workbook.

A spreadsheet can be defined as a file or document which comprises of cells in a tabulated format (rows and columns) typically used for formatting, arranging, analyzing, storing, calculating and sorting data on computer systems.

You cannot filter data based on certain specific conditions in Microsoft Excel 2013.

However, you can filter data based on certain specific conditions in Microsoft Excel with Office 365 subscriptions.

5 0
3 years ago
Add me on Pokemon go, my trainer code is 5584 3300 5313
evablogger [386]

Answer:

no want it

Explanation:

7 0
3 years ago
Following rules of compaction, the IPv6 address 2001:0db8:0000:0000:0000:ff00:0012:3456 could also be written as _______.
vampirchik [111]

In regards to the rules of compaction, the IPv6 address 2001:0db8:0000:0000:0000:ff00:0012:3456 could also be written as 2001:db8::ff00:12:3456.

<h3>What is IPv6?</h3>

The IPv6 address is known to be a form of Internet Layer protocol made for packet-switched internetworking and it helps to give  an end-to-end datagram movement in course of multiple IP networks.

Note that, In regards to the rules of compaction, the IPv6 address 2001:0db8:0000:0000:0000:ff00:0012:3456 could also be written as 2001:db8::ff00:12:3456.

Learn more aboutIPv6 address   from

brainly.com/question/5296366

#SPJ1

4 0
2 years ago
Similar to Wi-Fi, ____ is designed to provide Internet access to fixed locations (sometimes called hotzones), but the coverage i
andrew11 [14]

Similar to Wi-Fi, WiMAX is designed to provide Internet access to fixed locations (sometimes called hotzones), but the coverage is significantly larger.

<h3>What is WiMAX used for?</h3>

WiMax is know to be a full worldwide interoperability that is said to be made just for microwave access and this is said to be a form of a communication technology that was set up for wireless delivering of  high-speed Internet service to a lot of geographical areas.

Wi-Fi is also known to be a kind of a wireless technology that is often used to link up computers, tablets, and other devices to that of the internet.

Note that Wi-Fi is said to be a radio signal transmitted from a wireless router  and as such, Similar to Wi-Fi, WiMAX is designed to provide Internet access to fixed locations (sometimes called hotzones), but the coverage is significantly larger.

Learn more about Wi-Fi from

brainly.com/question/13267315

#SPJ1

8 0
2 years ago
How would you classify the earliest historical examples of STEM discoveries provided in this lesson?
Readme [11.4K]
MATHEMATICAL DISCOVERIES
4 0
4 years ago
Read 2 more answers
Other questions:
  • I need help RIGHT NOW PLZ!!!!!!!!!!!!! this is due in 5 mins
    13·1 answer
  • The ListIterator interface
    13·1 answer
  • "This command will give you a listing of your basic IP information for the computer you are using"
    6·1 answer
  • PLEASE HELP!!!!!!!!!!!!!!!!!!
    6·1 answer
  • Can you call a mobile a computer. It Yes<br>why? If No why​
    7·2 answers
  • What do you mean by algorithm​
    9·2 answers
  • Xavier buys a new laptop for $540. He makes a down payment $75 and pays the rest in 6 equal monthly payments, p. What equation r
    7·1 answer
  • What would your leadership style be?
    14·1 answer
  • What are different ways that celebrities try to connect with fans using the Internet and social media?
    5·1 answer
  • What do you understand by the term input, output, processing and storage.​
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!