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
hjlf
3 years ago
8

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 = currentColumnLetter
for(currentRow = 0; currentRow < numRows;currentRow++){
for(currentColumn = =

System.out.println("");
}
}
Engineering
1 answer:
baherus [9]3 years ago
5 0

Answer:

Explanation:

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();

       for (currentRow = 0; currentRow < numRows; currentRow++) {

           currentColumnLetter = 'A';

           for (currentColumn = 0; currentColumn < numColumns; currentColumn++) {

               System.out.print(currentRow + 1);

               System.out.print(currentColumnLetter + " ");

               currentColumnLetter++;

           }

       }

       System.out.println("");

   }

}

2

3

1A  1B  1C  2A  2B  2C

thanks

You might be interested in
A power company desires to use groundwater from a hot spring to power a heat engine. If the groundwater is at 95 deg C and the a
prisoha [69]

Answer:

W  = 12.8 KW

Explanation:

given data:

mass flow rate = 0.2 kg/s

Engine recieve heat from ground water at 95 degree ( 368 K)  and reject that heat to atmosphere  at 20 degree (293K)

we know that maximum possible efficiency is given as

\eta = 1- \frac{T_L}{T_H}

\eta = 1 - \frac{ 293}{368}

\eta = 0.2038

rate of heat transfer is given as

Q_H = \dot m C_p \Delta T

Q_H = 0.2 * 4.18 8(95 - 20)

Q_H = 62.7 kW

Maximuim power is given as

W = \eta Q_H

W = 0.2038 * 62.7

W  = 12.8 KW

3 0
3 years ago
A silicon carbide plate fractured in bending when a blunt load was applied to the plate center. The distance between the fractur
Amanda [17]

Question in order:

A silicon carbide plate fractures in bending when a blunt load was applied to the plate center. The distance between the fracture origin and the mirror/mist boundary on the fracture surface was 0.796 mm. To determine the stress used to break the plate, three samples of the same material were tested and produced the following. What is the estimate of the stress present at the time of fracture for the original plate?

Mirror Radius (mm) Bending Failure Stress (MPa)

0.603                         225

0.203                         368

0.162                         442

Answer:

191 MPa

Explanation:

Failure stress of bending is Inversely proportional to the mirror radius

Bending Stress = \frac{1}{(Mirror Radius)^{n}}

At mirror radius 1 = 0.603 mm   Bending stress 1 = 225 Mpa..............(1)

At mirror radius 2 = 0.203 mm  Bending stress 2 = 368 Mpa...............(2)

At mirror radius 3 = 0.162 mm   Bending stress 3 = 442 Mpa...............(3)

comparing case 1 and 2 using the above equation

\frac{Stress 1}{Stress 2} = ({\frac{Radius 2}{Radius 1}})^{n_1}

\frac{225}{368} = ({\frac{0.203}{0.603}})^{n_1}

0.6114 = (0.3366)^{n_1}

Taking the natural logarithm of both side

ln(0.6114) = n ln(0.3366)

n₁ = ln(0.6114)/ln(0.3366)

n₁ = 0.452

comparing case 2 and 3 using the above equation

\frac{Stress 2}{Stress 3} = ({\frac{Radius 3}{Radius 2}})^{n_2}

\frac{368}{442} = ({\frac{0.162}{0.203}})^{n_2}

0.8326 = (0.7980)^{n_2}

Taking the natural logarithm of both side

ln(0.8326) = n ln(0.7980)

n₂ = ln(0.8326)/ln(0.7980)

n₂ = 0.821

comparing case 1 and 3 using the above equation

\frac{Stress 1}{Stress 3} = ({\frac{Radius 3}{Radius 1}})^{n_3}

\frac{225}{442} = ({\frac{0.162}{0.603}})^{n_3}

0.5090 = (0.2687)^{n_3}

Taking the natural logarithm of both side

ln(0.5090) = n ln(0.2687)

n₃ = ln(0.5090)/ln(0.2687)

n₃ = 0.514

average for n

n = \frac{n_1 + n_2 + n_3}{3}

n = \frac{0.452 +0.821 + 0.514}{3}

n = 0.596

Hence to get bending stress x at mirror radius 0.796

\frac{Stress x}{Stress 3} = ({\frac{Radius 3}{Radius x}})^{0.596}

\frac{Stress x}{225} = ({\frac{0.603}{0.796}})^{0.596}

\frac{Stress x}{225} = 0.8475

stress x = 191 MPa

3 0
3 years ago
A steam power plant is represented as a heat engine operating between two thermal reservoirs at 800 K and 300 K. The temperature
Sergeeva-Olga [200]
Yeet is the answer .....
4 0
2 years ago
When plotting a single AC cycle beginning at zero degrees and moving forward in time the cycles negative peak occurs at
Lana71 [14]

Answer:A 270 degrees

Explanation:

4 0
3 years ago
90% of traffic crashes are due to driver error.<br> True<br> False
kumpel [21]

90% of traffic crashes are due to driver error.

True

3 0
2 years ago
Read 2 more answers
Other questions:
  • Which type of door consists of thin pieces of wood, glass, or louvers placed within a framed rectangular area?
    7·2 answers
  • The density of a fluid is given by the empirical equation rho 70:5 exp 8:27 107 P where rho is density (lbm/ft3 ) and P is press
    6·1 answer
  • A square isothermal chip is of width w = 5 mm on a side and is mounted in a substrate such that its side and back surfaces are w
    7·1 answer
  • A motor cycle is moving up an incline of 1 in 30 at a speed of 80 km/h,and then suddenly the engine shuts down.The tractive resi
    11·1 answer
  • What is the difference between digital instruments and decimal scaled instruments to measure
    6·1 answer
  • Chad is working on a design that uses the pressure of steam to control a valve in order to increase water pressure in showers. W
    5·1 answer
  • Difference between theory and practice?​
    10·1 answer
  • (I really need help ASAP please!! this is for science her is the problem)
    5·2 answers
  • Develop a simple Business plan as an entrepreneur​
    5·1 answer
  • What should you use to keep battery terminals from corroding
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!