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
m_a_m_a [10]
3 years ago
9

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. Ex: numRows = 2 and numColumns = 3 prints:
1A 1B 1C 2A 2B 2C
#include
using namespace std;

int main() {
int numRows;
int numColumns;
int currentRow;
int currentColumn;
char currentColumnLetter;

cin >> numRows;
cin >> numColumns;

/* Your solution goes here */

cout << endl;

return 0;
}

Computers and Technology
2 answers:
ANEK [815]3 years ago
4 0

Answer:

First for loop is for printing the rows.

Then we set currColumnLetter to 'A' for first time

Second for loop is for printing the columnletter with each row

Explanation:

devlian [24]3 years ago
4 0

Answer:

char rowList[26] = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};

for(char row = 'A';row<rowList[numRows];row++) {

for(int i = 1;i<=numColumns;i++)  {

 cout<<row<<i<<" ";

}

}

Explanation:

Replace /* Your solution goes here */ with the above code

and replace #include with #include<iostream>

The line 1 of the above code segment declares a list of all alphabets to represent the rows.

Line 2 and 3 make use of a loop to iterate through rows and column (depending on the input values)

Line 4 prints the resulting row and column values

Take for instance:

numRows = 3

numColumns = 4

What the compiler does is that;

it iterates from A to C --- for rows and

it iterates from 1 to 4 --- for columns

For the first row, it takes alphabet A and digit 1 to 4 to print

A1 A2 A3 A4

Same is applicable to B and C and even if the row is more than 3 as used in this instance

You might be interested in
You can create a ____ partition to hold files that are created temporarily, such as files used for printing documents (spool fil
LuckyWell [14K]

Answer:

The answer is "Option C".

Explanation:

The /var method can also be used to override the values of the current variable, or generate, and assign values to new variables. It generates a local variable, that can be modified via the -g switch, and other choices are not correct, which can be described as follows:

  • In option A, It is incorrect because it uses to store temporary data file.
  • In option B, It is used by a system administrator, that's why it is incorrect.
  • In option D, It isn't correct because it prints a warning message.
4 0
3 years ago
Guys I need help I cant download anything in the app store I restarted my phone and I know it's not the space on my phone I have
Simora [160]

Can you give me further explanation? For example, how is your phone not letting you download things? What model of a phone is it? what update is it on? and to what extent can you download something?

4 0
3 years ago
Samuel is working on decimal and binary conversion for his college project. He is using the binary number 111011 and wants to ex
SCORPION-xisa [38]

someone help i need the answer

4 0
3 years ago
1. Why isn't solar energy usually the only power source for a region?
ale4655 [162]
1. Every region doesnt get the same amount of sunlight as the rest due to whether or location an example would be that a region with alot of rain could have clouds that wouldnt let the solar panels to absorb as much sunlight as a more dry and sunny place 
2 wind farms can be used to store energy for a power outage and a way to lower the cost of electricity to a farmer 
3 using hydro energy requires people to build a dam that pours the water over a mill that rotates and stores energy from it 
4 a type of waste created by nuclear power plants would be daily uses that have radiation such as plastic containers ,gloves , disposable overalls, boots or just plain radioactive waste.
5 would be the total mass of organisms in a given area or volume 
6 is a process to further limit carbon dioxide emissions from burning coal
7 is basically the means to tap into energy savings that over time become an asset 
8 turning down the water heater thermostat and turning off lights when not in use can save energy 
9 smart grids use timing grid to determine how long you use electricity for and for how much you used
6 0
3 years ago
Read 2 more answers
2 4.1.2 Quiz: Information Systems and Business Planning
Delicious77 [7]

Answer:

Option D

Explanation:

Complete question

A management information system is typically used by _____.

A. all levels of employees

B. company executives

C. upper-level managers

D. middle-level managers

Solution

A management information system is typically used by middle-level managers

Option D is the correct answer

Management information system (MIS) helps the middle managers to control the work across the various teams of organization.

5 0
3 years ago
Other questions:
  • Match terms in the first column with the order descriptions in column two.
    11·1 answer
  • Okay I need help. In the first picture, the black glasses, that was my vision last year 52:17 135 and my vision now is 52:15 135
    5·1 answer
  • How to do this PLEASE HELP 80 points!
    15·1 answer
  • Which of the following statements is false? The ARPANET is the precursor to today’s Internet. Today’s fastest Internet speeds ar
    11·1 answer
  • Suppose I create a new kind of Java object, called "Kangaroo". Further suppose that at any given time, all instances of this new
    6·1 answer
  • What is network management?
    12·1 answer
  • Write a for loop that sets each array element in bonusScores to the sum of itself and the next element, except for the last elem
    11·2 answers
  • How much heat is needed to raise the temperature of 7g of water by 15oC?
    6·1 answer
  • Write a function in Java to implement the following logic:
    13·1 answer
  • The ______________<br> holds data only while the computer is on.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!