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
A clean machine is a _______________ machine.
solniwko [45]
A clean machine is a clean machine :-)
4 0
2 years ago
It is desired to produce and aligned carbon fiber-epoxy matrix composite having a longitudinal tensile strength of 630 MPa. Calc
ratelena [41]

Answer:

The answer is below

Explanation:

Given that:

Diameter (D) = 0.03 mm = 0.00003 m, length (L) = 2.4 mm = 0.0024 m, longitudinal tensile strength (\sigma_{cd})=630\ MPa = 630*10^6\ Pa, Fracture strength

(\sigma_f)=5100\ MPa=5100*10^6\ Pa,fiber-matrix\ stres(\sigma_m)=17.5\ MPa=17.5*10^6\ Pa,matrix\ strength=\tau_c=17\ MPa=17 *10^6\ Pa

a) The critical length (L_c) is given by:

L_c=\sigma_f*(\frac{D}{2*\tau_c} )=5100*10^6*\frac{0.00003}{2*17*10^6}=0.0045\ m=4.5\ mm

The critical length (4.5 mm) is greater than the given length, hence th composite can be produced.

b) The volume fraction (Vf) is gotten from the formula:

\sigma_{cd}=\frac{L*\tau_c}{D}*V_f+\sigma_m(1-V_f)\\\\V_f=\frac{\sigma_{cd}-\sigma_{m}}{\frac{L*\tau_c}{D}-\sigma_{m}}  \\\\Substituting:\\\\V_f=\frac{630*10^6-17.5*10^6}{\frac{0.0024*17*10^6}{0.00003} -17.5*10^6} \\\\V_f=0.456

6 0
3 years ago
What type of engineer would be most likely to develop a design for cars? chemical civil materials mechanical
Andreyy89
I don’t know but good luck
4 0
3 years ago
Calculate the osmotic pressure of seawater containing 3.5 wt % NaCl at 25 °C . If reverse osmosis is applied to treat seawater,
AlladinOne [14]

Answer:

Highest osmotic pressure that membrane may experience is

' =58.638 atm

Explanation:

Suppose sea-water taken is M= 1 kg

Density of water = 1000 kg/m3

Therefore Volume of water= Mass,M/Density of water

V= 1 kg/(1000 kg/m3)

V= 10-3 m3= 1 Litre

Since mass of Nacl is 3.5 wt%,Therefore in 1 kg of water

Mass present of NaCl= m= 0.035*1000 g

m= 35 g

Since molecular weight of NaCl= 58.44 g/mol =M.W.

Thus its Number of moles of Nacl= m/M.W

nNaCl= 35g/58.44 gmol-1

= 0.5989 mol

ans since volume of solution is 1 L thus concentration of NaCl is ,C= number of moles/Volume of solution in Litres

C= 0.5989mol/ 1L

=0.5989 M

Since 1 mol NaCL disssociates to form 2 moles of ions of Na+ andCl- Thus van't hoff factor i=2

And osmotic pressure  = iCRT ------------------------------(1)( Where R= 0.0821 L.atm/mol.K and T= 25oC= 298.15 K)

Putting in equation 1 ,we get  = 2*(0.5989 mol/L)*(0.0821 L.atm/mol.K)*298.15 K

=29.319 atm

Now as the water gets filtered out of the membrane,the water's volume decreases and concentration C of NacL increases, thus osmotic pressure also increases.Thus, at 50% water been already filtered out, the osmotic pressure at the membrane will be maximum

Thus Volume of water left after 50% is filtered out as fresh water= 0.5 L (assuming no salt passes through semi permeable membrane)

Thus New concentration of NaCl C'= 2*C

C'=2*0.5989 M

=1.1978 M

and Since Osmotic pressure is directly proportional to concentration, Thus As concentration C doubles to C', Osmotic Pressure  ' also doubles from  ,

Thus,Highest osmotic pressure that membrane may experience is,  '=2*  

=2*29.319 atm

' =58.638 atm

3 0
3 years ago
A utility generates electricity with a 36% efficient coal-fired power plant emitting the legal limit of 0.6 lb of SO2 per millio
Mama L [17]

Answer:

a) 570 kWh of electricity will be saved

b) the amount of  SO₂ not be emitted or heat of electricity saved is 0.00162 ton/CLF

c) $1.296 can be earned by selling the SO₂ saved by a single CFL

Explanation:

Given the data in the question;

a) How many kilowatt-hours of electricity would be saved?

first, we determine the total power consumption by the incandescent lamp

P_{incandescent} = 75 w × 10,000-hr = 750000 wh = 750 kWh

next, we also find  the total power consumption by the fluorescent lamp

P_{fluorescent} = 18 × 10000 = 180000 = 180 kWh

So the value of power saved will be;

P_{saved} = P_{incandescent}  - P_{fluorescent}

P_{saved} = 750 - 180

P_{saved}  = 570 kWh

Therefore, 570 kWh of electricity will be saved.

now lets find the heat of electricity saved in Bituminous

heat saved = energy saved per CLF / efficiency of plant

given that; the utility has 36% efficiency

we substitute

heat saved =  570 kWh/CLF / 36%

we know that; 1 kilowatt (kWh) = 3,412 btu per hour (btu/h)

so

heat saved =  570 kWh/CLF / 0.36 × (3412 Btu / kW-hr (

heat saved = 5.4 × 10⁶ Btu/CLF

i.e eat of electricity saved per CLF is 5.4 × 10⁶

b) How many 2,000-lb tons of SO₂ would not be emitted

2000 lb/tons = 5.4 × 10⁶ Btu/CLF

0.6 lb SO₂ / million Btu = x

so

x = [( 5.4 × 10⁶ Btu/CLF ) × ( 0.6 lb SO₂ /  million Btu )] / 2000 lb/tons

x = [( 5.4 × 10⁶ Btu/CLF ) × ( 0.6 lb SO₂ )] / [ ( 10⁶) × ( 2000 lb/ton) ]

x = 3.24 × 10⁶ / 2 × 10⁹

x = 0.00162 ton/CLF

Therefore, the amount of  SO₂ not be emitted or heat of electricity saved is 0.00162 ton/CLF

c)  If the utility can sell its rights to emit SO2 at $800 per ton, how much money could the utility earn by selling the SO2 saved by a single CFL?

Amount = ( SO₂ saved per CLF ) × ( rate per CFL )

we substitute

Amount = 0.00162 ton/CLF × $800

= $1.296

Therefore; $1.296 can be earned by selling the SO₂ saved by a single CFL.

3 0
3 years ago
Other questions:
  • Consider a unidirectional continuous fiber-reinforced composite with epoxy as the matrix with 55% by volume fiber.i. Calculate t
    10·1 answer
  • Check the answer that best describes the relationship between f(x) and x. (For example if f(x) is Θ(x) check that as your answer
    12·1 answer
  • A DNS record that's used to redirect traffic from one domain name to another is known as a _______ record.
    11·1 answer
  • Air at 27°C, 1 atm flows parallel to a flat plate, which is electronically heated. The plate is 0.5 m long in the direction of f
    8·1 answer
  • A ship tows a submerged cylinder, 1.5 m in diameter and 22 m long, at U = 5 m/s in fresh water at 20°C. Estimate the towing powe
    14·1 answer
  • A low-resistance path in a circuit, commonly called a _____ can cause a circuit breaker to trip
    7·1 answer
  • How do you build a house.
    15·1 answer
  • ASAP correct answer plss When you are driving, if you see this traffic sign it means
    8·1 answer
  • IF A CAR AHEAD OF YOU HAS STOPPED AT A CROSSWALK, YOU SHOULD:
    12·1 answer
  • A complete mix of an activated sludge system without primary clarification is used for treatment of municipal wastewater with a
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!