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
11) 6x^2-49x - 45<br> What is the factored answer to this trinomial
Lady bird [3.3K]
Factores is (6x+5)(x-9)
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
Which of these physical concepts is most important in civil engineering? A. energy transformations B. motion under gravity C. he
melamori03 [73]

Answer:

energy transformations

7 0
3 years ago
How many catalytic converters are in a ford ranger
fenix001 [56]

Answer:

up to 5

Explanation:

It depends on the year, you can also look on car forums for more detailed information.

5 0
3 years ago
Read 2 more answers
A crystalline grain of aluminum in a metal plate is situated so that a tensile load is oriented along the [1 1 1] direction. Wha
Ivenika [448]

Answer: required tensile stress is 0.889 MPa

Explanation:

Given that;

tensile load is oriented along the [1 1 1] direction

shear stress is 0.242 MPa along [1 0 1] in the (1 1 -1) plane

first we determine

λ which is Angle between  [1 1 1]  and  [1 0 1]

so

cosλ = [ 1(1) +  1(0) + 1(1) ] / [ √(1² + 1² + 1²) √(1² + 0² + 1²)]

= 2 / √3√2 =  2/√6

Next, we determine ∅ which is angle between [1 1 1]  and  [1 1 -1]

so,

cos∅ = [ 1(1) +  1(1) + 1(-1) ] / [ √(1² + 1² + 1²) √(1² + 1² + (-1)²)]

cos∅ = [ 2-1] / [√3√3 ]

cos∅ = 1/3

Now, we know that;

σ = T_stress/cosλcosθ

so we substitute

σ = 0.242 / ( 2/√6 × 1/3 )

σ = 0.242 / 0.2721

σ = 0.889 MPa

Therefore, required tensile stress is 0.889 MPa

3 0
3 years ago
Other questions:
  • The Prince Company, Inc has 100 employees. In 2009, the employees worked a total of 350,000 hours annual and reported 145 injuri
    6·1 answer
  • Consider a Pitot static tube mounted on the nose of an experimental airplane. A Pitot tube measures the total pressure at the ti
    12·1 answer
  • Explain different types of loads on beam with sketch
    8·1 answer
  • A structure that extends from a bridge to<br>form a firm foundation​
    6·2 answers
  • A square plate of titanium is 12cm along the top, 12cm on the right side, and 5mm thick. A normal tensile force of 15kN is appli
    9·1 answer
  • A misfire code is a type ____ DTC<br> A) 1 or 2<br> B) a or b<br> C) c or d<br> D l or ll
    15·1 answer
  • Describe a me <br><br> best answer gets brainliest
    9·2 answers
  • What relationship is there between the hydraulic system and power, force, energy, resources, and types of energy?
    11·2 answers
  • Buildings designed to partially heat rooms by passive solar heating rely on
    8·1 answer
  • Back Savers is a company that produces backpacks primarily for students. They are considering offering some combination of two d
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!