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
VMariaS [17]
3 years ago
5

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. Grading When you have completed your program, click the Submit button to record your score.
Computers and Technology
1 answer:
aleksandrvk [35]3 years ago
5 0

Answer:

Program is in C++

Explanation:

C++ Code:

#include <iostream>

#include <cctype>

using namespace std;

int main(){

char ch;

do{

 cout<<"Enter Character: ";

 cin>>ch;

 if (isupper(ch)){

  cout<<"OK"<<"\n";

 }

}

while(ch!='!');

return 0;

}

_______________________________________

Code Explanation

First execute a do while loop as we want user to enter at least first character to check whether its upper case or not. If user enters exclamation character then this loop will terminate along with the program.

To check whether the entered character is upper case or not we will be using isupper(ch) method defined in cctype library.

If the character is upper case then if condition will show Ok by printing it using cout and this program will show nothing if the character is not upper case.

Sample Output

Enter Character: A

OK

Enter Character: b

Enter Character: c

Enter Character: d

Enter Character: E

OK

Enter Character: G

OK

Enter Character: F

OK

Enter Character: !

You might be interested in
20 points!!!!! Plz answer quickly
Elena L [17]

Answer:

other words are not clear

3 0
2 years ago
2.5 code practice I need answers please
Leni [432]

Answer:

import random

a = random.randint(1,10)

b = random.randint(1,10)

answer = a * b

print (str(a) + " X " + str(b) + " = " + str(answer))

Explanation:

Happy to help you mate

7 0
3 years ago
Monica is writing a paper, and it needs to contain a certain amount of words. What Word Online feature can she use?IndentingProo
Greeley [361]

Answer:

Its word count so she knows how much words she is writing

Explanation:

7 0
2 years ago
public class Test { public static void main(String[] args) { try { method(); System.out.println("After the method call"); } catc
USPshnik [31]

Answer:

"ArithmeticException" is the correct answer for the above question.

Explanation:

Missing Information : The above question does not hold that "what is the output of the program".

  • The above question has a class that holds the two functions one function is the main function which calls the other function in a try-catch block.
  • The method function holds one run time exception which is 1/0 which is an arithmetic exception.
  • It can be handle by the help of an arithmetic class object which is defined in the first catch block.
  • Hence the print function of this catch is executed and prints "ArithmeticException".
8 0
3 years ago
Tyra used the software development life cycle to create a new game. After debugging and documenting code, she released it to her
REY [17]

Answer:

Maintenance

Explanation:

Maintenance

This primarily involves updating and making improvements based on user feedback, as well as resolving any defects that arise.

6 0
3 years ago
Other questions:
  • Define the following term: - hue
    11·2 answers
  • What color model should Joe use if he will be using an offset printing press?
    7·1 answer
  • Which of the following is a template definition?
    5·1 answer
  • Using Karnaugh maps, simplify the following Boolean function:
    14·1 answer
  • What is the unit used to describe the intensity of sound?
    5·1 answer
  • Unemployment can be viewed as
    14·1 answer
  • In order for a fault-block mountain to form, a ______ must take place along a fault line and one side must be ________.
    11·1 answer
  • What is a programming language?
    14·2 answers
  • Overheating of a computer can be easily prevented. Explain how​
    15·1 answer
  • I am booooooored any one want to join
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!