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
Which - type of service shop is least likely to provide service to all
MatroZZZ [7]
E. None of the above
8 0
2 years ago
One cylinder in the diesel engine of a truck has an initial volume of 650 cm3 . Air is admitted to the cylinder at 35 ∘C and a p
kupik [55]

Answer:

1) the final temperature is T2 = 876.76°C

2) the final volume is V2 = 24.14 cm³

Explanation:

We can model the gas behaviour as an ideal gas, then

P*V=n*R*T

since the gas is rapidly compressed and the thermal conductivity of a gas is low a we can assume that there is an insignificant heat transfer in that time, therefore for adiabatic conditions:

P*V^k = constant = C, k= adiabatic coefficient for air = 1.4

then the work will be

W = ∫ P dV = ∫ C*V^(-k) dV = C*[((V2^(-k+1)-V1^(-k+1)]/( -k +1) = (P2*V2 - P1*V1)/(1-k)= nR(T2-T1)/(1-k) = (P1*V1/T1)*(T2-T1)/(1-k)

W = (P1*V1/T1)*(T2-T1)/(1-k)  

T2 = (1-k)W* T1/(P1*V1) +T1

replacing values (W=-450 J since it is the work done by the gas to the piston)

T2 = (1-1.4)*(-450J) *308K/(101325 Pa*650*10^-6 m³) + 308 K= 1149.76 K = 876.76°C

the final volume is

TV^(k-1)= constant

therefore

T2/T1= (V2/V1)^(1-k)

V2 = V1* (T2/T1)^(1/(1-k)) = 650 cm³ * (1149.76K/308K)^(1/(1-1.4)) = 24.14 cm³

3 0
3 years ago
Briefly explain the term soil sampling and outline its importance in building engineering works.
Nataliya [291]

Answer:

For civil engineering, the importance is that you want to ensure that your construction is in a good sturdy location.

Explanation:

Im at UNCC as a civil engineering student

4 0
1 year ago
Select four items that an industrial engineer must obtain in order to practice in the field.
alex41 [277]

Answer:

Professional engineering license

Bachelor's degree

Computer science classes

job recommendations

3 0
2 years ago
Read 2 more answers
python Given num_rows and num_cols, print a list of all seats in a theater. Rows are numbered, columns lettered, as in 1A or 3E.
MissTica

Explanation:

First of all get the input from the user, number of rows and number of columns where rows represents seat digit number and column represents the seat letter

rows is initialized to 1 to ensure that row starts at 1 or you can remove it then seat number will start from 0.

The first loop is used for digits starting from 1 to number of rows

The second loop is used for letters starting from 1 to number of columns

since rows and cols are not of the same type that's why we are converting the int type to string type

print(str(rows)+cols) counter will keep updating the columns A, B, C.....

rows= rows + 1 counter will keep updating the rows 1, 2, 3....

Code:

Please refer to the attached image.

Output:

Please enter the number of rows: 2

Please enter the number of columns: 3

1A

1B

1C

2A

2B

2C

3 0
3 years ago
Other questions:
  • 1- A square-wave inverter has a dc source of 96 V and an output frequency of 60 Hz. The load is a series RL load with R = 5 Ohm
    7·1 answer
  • Two technicians are discussing solder wire repair. Technician A says that electrical tape can be used to cover the joint. Techni
    10·1 answer
  • Which of the following is an example of an iterative process?
    12·1 answer
  • Are you able to text without looking at your phone?
    10·1 answer
  • Question 3 (5 points)
    7·1 answer
  • A compressor receives air at 290 K, 95 kPa and shaft work of 5.5 kW from a gasoline engine. It should deliver a mass flow rate o
    7·1 answer
  • I need help due today please help
    5·1 answer
  • Welding and cutting done in confined spaces must
    5·2 answers
  • Computer system analyst advantage​
    5·2 answers
  • The driver should be able to see the ground within _____ to the front?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!