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
SMAW and GMAW use constant current arc welding machines.<br><br> True<br><br> False
Oksi-84 [34.3K]
It is true. Good luck
4 0
3 years ago
On-site oil storage containers must be marked "Used Oil."<br><br> True. <br><br> False.
Scrat [10]

Answer:

How must used oil storage containers be marked? Containers and aboveground tanks used to store used oil at generator facilities must be labeled or marked clearly with the words “Used Oil" (40 CFR Section 279.22(c)).

Explanation:

i think it will help you

7 0
3 years ago
The voltage and current at the terminals of the circuit element in Fig. 1.5 are zero fort &lt; 0. Fort 2 0 they areV =75 ~75e-10
masya89 [10]

Answer:

maximum value of the power delivered to the circuit =3.75W

energy delivered to the element = 3750e^{ -IOOOt} - 7000e ^{-2OOOt} -3750

Explanation:

V =75 - 75e-1000t V

l = 50e -IOOOt mA

power = IV = 50 * 10^-3 e -IOOOt * (75 - 75e-1000t)

=50 * 10^-3 e -IOOOt *75 (1 - e-1000t)

=

maximum value of the power delivered to the circuit =3.75W

the total energy delivered to the element = \int\limits^t_0  {3.75(e^{ -IOOOt} - e ^{-2OOOt} )} , dx \\\\

3750e^{ -IOOOt} - 7000e ^{-2OOOt} -3750

5 0
3 years ago
A rigid tank contains 2 kg of N2 and 4 kg of Co2 at temperature of 25 C and 1 MPa. Find the partial pressure of each gas respect
lions [1.4K]

Answer: Partial pressures are 0.6 MPa for nitrogen gas and 0.4 MPa for carbon dioxide.

Explanation: <u>Dalton's</u> <u>Law</u> <u>of</u> <u>Partial</u> <u>Pressure</u> states when there is a mixture of gases the total pressure is the sum of the pressure of each individual gas:

P_{total} = P_{1}+P_{2}+...

The proportion of each individual gas in the total pressure is expressed in terms of <u>mole</u> <u>fraction</u>:

X_{i} = moles of a gas / total number moles of gas

The rigid tank has total pressure of 1MPa.

  • Nitrogen gas:

molar mass = 14g/mol

mass in the tank = 2000g

number of moles in the tank: n=\frac{2000}{14} = 142.85mols

  • Carbon Dioxide:

molar mass = 44g/mol

mass in the tank = 4000g

number of moles in the tank: n=\frac{4000}{44} = 90.91mols

Total number of moles: 142.85 + 90.91 = 233.76 mols

To calculate partial pressure:

P_{i}=P_{total}.X_{i}

For Nitrogen gas:

P_{N_{2}}=1.\frac{142.85}{233.76}

P_{N_{2}} = 0.6

For Carbon Dioxide:

P_{total}=P_{N_{2}}+P_{CO_{2}}

P_{CO_{2}} = P_{total}-P_{N_{2}}

P_{CO_{2}}=1-0.6

P_{CO_{2}}= 0.4

Partial pressures for N₂ and CO₂ in a rigid tank are 0.6MPa and 0.4MPa, respectively.

4 0
3 years ago
A vehicle is considered to be legally parked if it is parked _____ or more from a pedestrian crosswalk or a marked or unmarked i
Yuki888 [10]

Answer:

A vehicle is considered to be legally parked if it is parked 20 feet (6 m) or more from a pedestrian crosswalk or a marked or unmarked intersection.

Explanation:

Hello!

I obtained the provided data from the New York State Driver's Manual. I wish it was useful to help you.

Success in your homework!

7 0
3 years ago
Other questions:
  • Suppose a possibly biased die is rolled 30 times and that the face containing
    13·1 answer
  • g In the above water treatment facility, chemical concentration (mg/gal) within the tank can be considered uniform. The initial
    8·1 answer
  • Sometimes, steel studs may not be used on outside walls because they are?
    13·1 answer
  • Why is it important to stop climate change?
    15·2 answers
  • A wastewater treatment plant has two primary clarifiers, each 20m in diameter with a 2-m side-water depth. the effluent weirs ar
    8·1 answer
  • What is a quasi-equilibrium process? What is its importance in engineering?
    14·1 answer
  • ممكن الحل ............
    10·1 answer
  • A converging-diverging nozzle has an area ratio of 5.9. (1) Determine the (P0/Pt) values corresponding to the 1st, 2nd, and 3rd
    5·1 answer
  • Define Ancestor, Descendant, Siblings, Height, Depth, Root and Leaf for the
    9·1 answer
  • How much work, in Newtons, is required to lift a 20.4-kg (45lb) plate from the ground to a stand that is 1.50 meters up?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!