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
In crash tests, a shock absorber is used to slow the test car. The shock absorber consists of a piston with small holes that mov
Lesechka [4]

Answer:

The heat transferred to water equals 1600 kJ

Explanation:

By the conservation of energy we have

All the kinetic energy of the moving vehicle is converted into thermal energy

We know that kinetic energy of a object of mass 'm' moving with a speed of 'v' is given by

K.E=\frac{1}{2}mv^{2}

Thus

K.E_{car}=\frac{1}{2}\times 2000\times 40^{2}=1600\times 10^{3}Joules

Thus the heat transferred to water equals 1600kJ

3 0
3 years ago
Which of the following types of protection is an employer required to pay for?
77julia77 [94]

Answer:

Hearing protection would be your answer!

Explanation:

This includes earplugs,muffs etc.

Hope it helps!

7 0
4 years ago
Read 2 more answers
How are laws and regulations different from one another? A, Laws are long-standing, while regulations can be modified quickly La
vichka [17]

Answer:

Terms in this set (18)

Original

Which agency is responsible for managing Florida's hunting laws and regulations?

*The Fish & Wildlife Conservation Commission

*The US Fish & Wildlife Service

*The International Hunter Education Association

*The National Rifle Association

The Fish & Wildlife Conservation Commission

How are laws and regulations different from one another?

*Laws are long-standing, while regulations can be modified quickly

*Laws can be modified quickly, while regulations are long-standing

*Laws are governed by the federal government while regulations are governed by the state government

*Violators of laws are taken to criminal court while violators of regulations are taken to civil court.

Laws are long-standing, while regulations can be modified quickly

Why were hunting laws and regulations initially enacted?

*To help market hunters get enough game to survive

*To protect wildlife from over hunting and market hunting

*To help hunters get a fair price for food from wild game

*To protect wildlife from fair chase and conservation efforts

To protect wildlife from over hunting and market huntingExplanation:

8 0
3 years ago
Read 2 more answers
What's the best way to find the load capacity of a crane? Select the best option. Call the manufacturer Ask co-workers Look at t
Orlov [11]

Answer: You need to lift a load of 15 tons (30,000 pounds) a distance of 25 feet. The distance is measured from the center pin of the crane to the center of the load. Once you determine the distance, look on that line for the largest capacity; that will indicate how many feet of boom must be extended

Explanation:

5 0
3 years ago
Magbigay ng Limang gawain pagtulong sa pamilya o kapitbahay
leva [86]

Answer:

what? i dont know what you you are saying

Explanation:

5 0
2 years ago
Other questions:
  • The typical measurement of hotel demand is the room night (RN). When we say that each room night is perishable , we mean that on
    10·1 answer
  • Tool life testing on a lathe under dry cutting conditions gauge 'n' and 'C' of Taylor tool life equation as 0.12 and 130 m/min.
    9·1 answer
  • ) A 20 ft horizontal beam is attached to a wall with a fixed support. If the beam is subjected to the distributed loads indicate
    12·1 answer
  • . A 10W light bulb connected to a series of batteries may produce a brighter lightthan a 250W light bulb connected to the same b
    8·2 answers
  • Which option supports the following scenario?
    14·1 answer
  • What historical event allowed both aerospace fields to make enormous strides<br> forward? *
    12·1 answer
  • What are the advantages and disadvantages of each type of structure?
    14·1 answer
  • 7. Which of the following is a disadvantage of an electromagnet?
    10·1 answer
  • Can someone make me a chair on onshape DONT be rude I’m sick of wasting my points and getting them back now the points are going
    7·1 answer
  • Technician a s ays both an ohmmeter and a self-powered test light may be used to test for continuity. technician b says both may
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!