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
Ví dụ sau sẽ in ra dữ liệu của x là kiểu gì ?
Virty [35]
Sjsjsjsjsjdhshshshshususs
7 0
2 years ago
Explain what mistake Miranda made in the following scenario. Situation: Miranda suspects that there may be a problem with the ha
Dennis_Churaev [7]

Answer: Answer below.

Explanation:

I'm not fully sure myself, so don't agree with me fully.

I believe what she may have done wrong is tell the technician about a "program." A program doesn't have to do anything with physical hardware.

5 0
3 years ago
Read 2 more answers
A(n) __________ is a set of technologies used for exchanging data between applications and for connecting processes with other s
Harrizon [31]

Answer:

The answer is "Option ".

Explanation:

The SOA stands for "Service-Oriented Architecture", which is primarily known as a service set and these services enable you to communicate with each other. In the communication, it may require simple data to transfer to two or more services, which can be organized by those operations, and other options were incorrect, that can be explained as follows:

  • In option a, It is a business software, which is used to organized data, that's why it is wrong.
  • Option b and Option d both are wrong because the mashup process is used only on web services, which is not a part of SOA , that's why it is wrong.
5 0
3 years ago
Read 2 more answers
HELP BRAINLIEST FOR RIGHT ANSWER
Scilla [17]

Answer:

true I know this cuz I smart

7 0
3 years ago
Read 2 more answers
You decide to buy some stocks for a certain price and then sell them at anotherprice. Write a program that determines whether or
Otrada [13]

Answer:

no_of_shares = int(input("Enter the number of shares: "))

purchase_price = float(input("Enter the purchase price of the stock: "))

sale_price = float(input("Enter the sale price of the stock: "))

total_stock_price = purchase_price*no_of_shares

total_spend_on_buying = total_stock_price + (0.03*total_stock_price)

total_sale_price = sale_price*no_of_shares

commission_while_selling = total_sale_price*0.03

net_gain_or_loss = total_sale_price - (total_spend_on_buying + commission_while_selling)

if(net_gain_or_loss<0):

print("After the transaction, you lost {} dollars".format(abs(net_gain_or_loss)))

else:

print("After the transaction, you made {} dollars".format(abs(net_gain_or_loss)))

7 0
3 years ago
Other questions:
  • Nancy would like to configure an automatic response for all emails received while she is out of the office tomorrow, during busi
    13·2 answers
  • The concept of ____ refers to the idea that the internet is designed for all content to be treated equally.
    12·1 answer
  • An email message form includes all of the following main areas except
    11·2 answers
  • The array s of ints contain integers each of which is between 1 and 1000 (inclusive). write code that stores in the variable ord
    9·1 answer
  • 14<br> Select the correct answer.<br> Which activity is a marketing technique?
    9·1 answer
  • You use a cisco 2900 router in your network. you are considering purchasing and implementing the Unifield communications feature
    8·1 answer
  • How can an Excel table be added to a Word document? Check all that apply.
    15·1 answer
  • Panes created using the vertical split bar scroll together horizontally. true or false.
    12·1 answer
  • Consider the following code segments that are potential replacements for /* missing code */.
    6·1 answer
  • Create a program that prompts the user for a positive integer then prints a right-aligned pyramid using that number using the st
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!