Answer:
Step by step explanation along with C++ code is provided below.
C++ Code:
#include <iostream>
using namespace std;
int main()
{
int numRows;
int numCols;
int r = 1;
cout <<"Please enter no. of rows"<<endl;
cin>>numRows;
cout <<"Please enter no. of columns"<<endl;
cin>>numCols;
cout<<"Seating arrangement in the theater:"<<endl;
for(int i = 0; i < numRows; i++)
{
char c = 'A';
for(int j = 0; j < numCols; j++)
{
cout <<r << c << " ";
c= c + 1;
}
r= r + 1;
}
return 0;
}
Explanation:
// the outer loop prints the rows
// counter r = r + 1 increments the rows
// the inner loop prints columns
// counter c = c + 1 increments the columns
// int r = 1 ensures that rows starts from 1
Output:
The program is tested multiple times and is working correctly for any number of rows and columns
Please enter no. of rows
2
Please enter no. of columns
3
Seating arrangement in the theater:
1A 1B 1C 2A 2B 2C
Answer:
If you want to remove/ ignore punctuation before and after a word javascript, my suggestion is to remove specific punctuation from a string, it will probably be best to explicitly remove exactly what you won't like.
A file format that provides an electronic image of text or text and graphics that looks like a printed document and can be viewed, printed, and electronically transmitted.
a file in PDF format.
"I sent him a PDF of the article"
Answer:
Difference between Queue and Stack are as following:-
- Queue is a FIFO(First In First Out) type data structure while Stack is a LIFO(Last In First Out) type data structure.
- The insertion and deletion of elements from the queue happens from two ends insertion at the tail and deletion from the front.While the insertion and deletion from stack happens from one end only that is top.
- The insertion and deletion operation in queue are referred as enqueue and dequeue. While in stack they are referred as push and pop respectively.