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
Polymer ropes and lines for use on water are often designed to float, to aid in their retrieval and to avoid applying a downward
andrew-mc [135]

Answer:

We choose PTFE

Explanation:

Attached are the modulus density and modulus strength chart.

Due to its young modulus, the density is near 0.5 GPa, as seen in the chart and support water gliding. The PTFE density is between 1 and 10 Mg / cubic meter (see module and chart of density), and the resistance is between 10 and 100 Mpa (see module and chart of strength). Therefore, the finest ploymer will be PTFE that meets the requirements.

8 0
3 years ago
Explain the four criteria for proving the correctness of a logical pretest loop construct of the form "while B do S end". And pr
evablogger [386]

Answer:

Check the explanation

Explanation:

The loop invariant has to satisfy some amount of requirements to be of good use. Another complex factor as to why a loop is the question of loop termination. A loop that doesn’t terminate can’t invariably be correct, and in fact the computation in whatever form amounts to nothing. The total axiomatic description of a while construct will have to involve all of the following to be true, in which I is the loop invariant:

P => I

{I and B} S {I}

(I and (not B)) => Q

Then the loop terminates

6 0
3 years ago
What causes the charging system warning lamp to go out when the engine starts up?
Flura [38]
B is the answer I believe so
7 0
3 years ago
A gas stream contains 4.0 mol % NH3 and its ammonia content is reduced to 0.5 mol % in a packed absorption tower at 293 K and 10
bagirrra123 [75]

Answer:

Explanation:

Step by step solved solution is given in the attached document.

8 0
3 years ago
Which option identifies the type of device the engineer will develop in the following scenario?
Stells [14]
It would be actuator
4 0
2 years ago
Read 2 more answers
Other questions:
  • "The office personnel at Garden Glory use a database application to record services and related data changes in this database. F
    9·1 answer
  • Can you carry 1 m3 of liquid water? Why or why not? (provide the weight to support your answer)
    7·1 answer
  • There are 22 gloves in a drawer: 5 pairs of red gloves, 4 pairs of yellow, and 2 pairs of green. You select the gloves in the da
    13·1 answer
  • In designing a fixed-incline self-acting thrust pad when the width of the pad is much larger than the length, it is of interest
    10·1 answer
  • How long does it take electrons to get from a car battery to the starting motor? Assume the current is 300 A and the electrons t
    10·1 answer
  • Water at 20◦C is pumped through 1000 ft of 0.425 ft diameter pipe at a volumetric flowrate of 1 ft3/s through a cast iron pipe t
    14·1 answer
  • Consider the following example: The 28-day compressive strength should be 4,000 psi. The slump should be between 3 and 4 in. and
    13·1 answer
  • E) What are the major jobs of a nurse?<br><br>​
    14·1 answer
  • How can you contribute to achieved the mission of NSTP during pandemic in your society?
    7·1 answer
  • How do you get your drivers lisnes when your 15
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!