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
Dmitriy789 [7]
3 years ago
8

Write an application named EnterUppercaseLetters that asks the user to type an uppercase letter from the keyboard. If the charac

ter entered is an uppercase letter, display OK; if it is not an uppercase letter, display an error message. The program continues until the user types an exclamation point. C# C# C#
Engineering
1 answer:
ozzi3 years ago
6 0

Answer:

The solution code is given below

  1. using System;
  2. using System.Linq;
  3.      
  4. public class Program
  5. {
  6. public static void Main()
  7. {
  8.  string[] letters = {"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"};
  9.  
  10.  Console.WriteLine("Please input a letter: ");
  11.  string input_letter = Console.ReadLine();
  12.  
  13.  if(letters.Contains(input_letter)){
  14.   Console.WriteLine("OK");
  15.  }else{
  16.   Console.WriteLine("Error. Not uppercase letter.");
  17.  }  
  18. }
  19. }

Explanation:

Firstly we import the necessary libraries, System and Linq (Line 1-2).

Next we create a string array to hold all uppercase letters (Line 8).

Next, we prompt user to input a letter using the ReadLine() method (Line 10 - 11)

At last, we define if and else conditions to check if the letters contains the input letter. If so, print ok else print an error message. (Line 13-17)

You might be interested in
Technician A says that reinforcements may be made of plastic,
lord [1]

Answer:

A Only

Explanation:

Reinforcements, as the name suggests, are used to enhance the mechanical properties of a plastic. Finely divided silica, carbon black, talc, mica, and calcium carbonate, as well as short fibres of a variety of materials, can be incorporated as particulate fillers.

3 0
3 years ago
g . 3. For each of the following statements Write the statement as an English sentence that does not use the symbols for quan 2.
lubasha [3.4K]

Answer:

(a)

( ∃x ∈ Q) ( x > √2)

There exists a rational number x such that x > √2.

( ∀x ∈ Q) ( ( x ≤ √2)

For each rational number x,  x ≤ √2.

(b)

(∀x ∈ Q)(x² -  2 ≠ 0).

For all rational numbers x, x² -  2 ≠ 0

( ∃x ∈ Q ) ( x² - 2 = 0 )

There exists a rational number x such that  x² -  2 = 0

(c)

(∀x ∈ Z)(x is even or x is odd).

For each integer x, x is even or x is odd.

( ∃x ∈ Z ) (x is odd and x is even)

There exists an integer x such that x is odd and x is even.

(d)

( ∃x ∈ Q) ( √2 < x < √3 )

There exists a rational number x such that √2 < x < √3

(∀x ∈ Q) ( x ≤ √2 or x ≥ √3 )

For all rational numbers x,  x ≤ √2 or x ≥ √3.

3 0
3 years ago
It is given that 50 kg/sec of air at 288.2k is iesntropically compressed from 1 to 12 atm. Assuming a calorically perfect gas, d
denis23 [38]

The exit temperature is 586.18K and  compressor input power is 14973.53kW

Data;

  • Mass = 50kg/s
  • T = 288.2K
  • P1 = 1atm
  • P2 = 12 atm

<h3>Exit Temperature </h3>

The exit temperature of the gas can be calculated isentropically as

\frac{T_2}{T_1} = (\frac{P_2}{P_1})^\frac{y-1}{y}\\ y = 1.4\\ C_p= 1.005 Kj/kg.K\\

Let's substitute the values into the formula

\frac{T_2}{T_1} = (\frac{P_2}{P_1})^\frac{y-1}{y} \\\frac{T_2}{288.2} = (\frac{12}{1})^\frac{1.4-1}{1.4} \\ T_2 = 586.18K

The exit temperature is 586.18K

<h3>The Compressor input power</h3>

The compressor input power is calculated as

P= mC_p(T_2-T_1)\\P = 50*1.005*(586.18-288.2)\\P= 14973.53kW

The compressor input power is 14973.53kW

Learn more on exit temperature and compressor input power here;

brainly.com/question/16699941

brainly.com/question/10121263

6 0
3 years ago
Consider an ideal cogeneration steam plant to generate power and process heat. Steam enters the turbine from the boiler at 7 Mpa
igomit [66]

Answer:

1. The diagram T-s or H-s is attached to this answer.

2. The fraction of the steam extracted is 4.088Kg/s

3. The net Power produced per kg of steam exiting the boiler is 1089.5KJ/Kg.

4. The mass flow rate of steam supplied by the boiler is 16.352Kg/s

5. the net power produced by the plant is 11016.2KJ/s.

6. The utilization factor is 0.218.

Explanation:

To analyze this problem we need to find all the thermodynamic coordinates of the system. In the second image attached to this answer, we can see the entire ideal cogeneration steam plant system.

From a water thermodynamic properties chart, we can obtain the information for each point.

+ Steam enters the turbine from the boiler at 7 Mpa and 500 degrees C:

h₆=3410.56KJ/Kg

s₆=6.7993 KJ/Kg

This is an ideal cogeneration steam system, therefore: s₆=s₇=s₈

+One-fourth of the steam is extracted from the turbine at 600-kPa:

h₇(s₇) = 2773.74 KJ/Kg (overheated steam)

+The remainder of the steam continues to expand and exhausts to the condenser at 10 kPa.

h₈(s₈)=2153.58 KJ/Kg (this is wet steam with title X=0.8198)

h₁(P=10Kpa)= 191.83 KJ/Kg (condensed water) s₁=0.64925KJ/Kg

-This flow is pumped to 600KPa, so:

s₂=s₁

h₂(s₂)=192.585KJ/Kg

+The steam extracted for the process heater is condensed in the heater:

h₃(P=600KPa)=670.42KJ/Kg (condensed water)

+The steam extracted for the process heater is condensed in the heater and mixed with the feed-water at 600 kPa:

The mixing process of the flow of point 2 and 3 is an adiabatic process, therefore:

\dot{Q}_4=\dot{Q}_2+\dot{Q}_3=\dot{m}_2 h_2+\dot{m}_3h_3\\\dot{m}_4 h_4=\dot{m}_2 h_2+\dot{m}_3h_3=\dot{m}_2 0.75h_4+\dot{m}_30.25h_4\\h_4=0.75h_2+0.25h_3=312.043KJ/Kg

s₄=1.02252

+the mixture is pumped to the boiler pressure of 7 Mpa:

s₅=s₄

h₅(s₅)=323.685KJ/Kg

1)Now we have all the thermodynamic coordinates and we can draw the diagram of the system.

2) To determine the fraction of steam, the mass flow that is extracted from the turbine at state 7, we use the information that this flow is used to generate 8600KJ/s in a process of heat. Therefore:

P=8600KJ/s=\dot{m}_{3-7}(h_7-h_3)\\\dot{m}_{3-7}=8600KJ/s/(h_7-h_3)=4.088Kg/s

3)The net power produced per kg of steam exiting the boiler can be obtained as the rest between all the power obtained in the turbine less the power used in the pumps:

P_{turb}/Kg=(h_6-h_7)+0.75(h_7-h_8)=1101.94KJ/Kg\\P_{pump1}/Kg=h_2-h_1=0.755KJ/kg\\P_{pump2}/kg=h_5-h_4=11.642KJ/Kg\\P_{net}/kg=P_{turb}-P_{pump1}-P_{pump2}=1089.543KJ/Kg

4) To determine the mass flow rate of steam that must be supplied by the boiler, we only have to remember that the flow used in point 2) is a fourth of the total flow. therefore:

0.25\dot{m}_{tot}=\dot{m}_{3-7}\\\dot{m}_{tot}=4\dot{m}_{3-7}=16.352Kg/s

5)The net power supplied by the plant is the net power calculated in point 3) less the power used in the heat process 7-3:

P_{net sys}=P_{net}/kg \cdot \dot{m}_t-6800Kj/s=11016.2KJ/s

6) The utilization factor is obtained as the division between net power supplied by the plant and the power used to heat the steam. In this case:

UF=P_{net sys}/P_{boil}=P_{net sys}/[\dot{m}_t(h_6-h_5)]=0.21

3 0
3 years ago
Your company is planning to build a pipeline to transport gasoline from the refinery to a field of storage tanks. The parameters
AleksandrR [38]

Answer:

The model system will need water flowing at a velocity of 2.07 meters per second to guarantee kinematic similarity in the form of equal Reynolds numbers.

Explanation:

The Reynolds number (Re_{D}) is a dimensionless criterion use for flow regime of fluids, which is defined as:

Re_{D} = \frac{\rho \cdot v\cdot D}{\mu} (Eq. 1)

Where:

\rho - Density, measured in kilograms per cubic meter.

\mu - Dynamic viscosity, measured in kilograms per meter-second.

v - Average flow velocity, measured in meters per second.

D - Pipe diameter, measured in meters.

We need to find the equivalent velocity of water used in the prototype system. In this case, we assume that Re_{D,gas} = Re_{D,w}. That is:

\frac{\rho_{w}\cdot v_{w}\cdot D_{w}}{\mu_{w}} = \frac{\rho_{gas}\cdot v_{gas}\cdot D_{gas}}{\mu_{gas}} (Eq. 2)

Where subindex w is used for water and gas for gasoline.

If we know that \rho_{gas} = 690\,\frac{kg}{m^{2}}, \mu_{gas} = 0.006\,\frac{kg}{m\cdot s}, v_{gas} = 0.5\,\frac{m}{s}, D_{gas} = 1\,m, \rho_{w} = 1000\,\frac{kg}{m^{3}}, \mu_{w} = 0.0018\,\frac{kg}{m\cdot s} and D_{w} = 0.05\,m, then we get the following formula:

57500 = 27777.778\cdot v_{w}

The fluid velocity for the prototype system is:

v_{w} = 2.07\,\frac{m}{y}

The model system will need water flowing at a velocity of 2.07 meters per second to guarantee kinematic similarity in the form of equal Reynolds numbers.

3 0
3 years ago
Other questions:
  • Write a SELECT statement that returns the same result set as this SELECT statement. Substitute a subquery in a WHERE clause for
    10·1 answer
  • Policy makers in the U.S. government have long tried to write laws that encourage growth in per capita real GDP. These laws typi
    6·1 answer
  • Describe with an example how corroded structures can lead to environment pollution? ​
    13·1 answer
  • Let Deterministic Quicksort be the non-randomized Quicksort which takes the first element as a pivot, using the partition routin
    13·1 answer
  • The inlet for a high-bypass-ratio turbofan engine has an area A1 of 6.0 m 2 and is designed to have an inlet Mach number M~ of 0
    6·1 answer
  • What are potential impacts of clean energy? Predict the impact on future<br> generations.
    14·1 answer
  • A rectangular conductor with a cross sectional area of 1.04 square millimeters (mm) ^2 has a resistance of 0.075 ohms. What woul
    8·1 answer
  • What kind of analysis would be conducted to identify project costs?
    11·1 answer
  • What is an OTG USB? how is it useful ​
    14·1 answer
  • A half-wave rectifier circuit with a 1 kΩ load operates from a 120 V (rms value), 60 Hz household supply through a 10-to-1 step-
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!