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
klio [65]
3 years ago
5

Write a C program to input a character, then check if the input

Computers and Technology
1 answer:
rodikova [14]3 years ago
6 0

Answer:

// CPP program to find type of input character

#include <iostream>

using namespace std;

void charCheck(char input_char)

{

// CHECKING FOR ALPHABET

if ((input_char >= 65 && input_char <= 90)

|| (input_char >= 97 && input_char <= 122))

cout << " Alphabet ";

// CHECKING FOR DIGITS

else if (input_char >= 48 && input_char <= 57)

cout << " Digit ";

// OTHERWISE SPECIAL CHARACTER

else

cout << " Special Character ";

}

// Driver Code

int main()

{

char input_char = '$';

charCheck(input_char);

return 0;

}

Explanation:

// CPP program to find type of input character

#include <iostream>

using namespace std;

void charCheck(char input_char)

{

// CHECKING FOR ALPHABET

if ((input_char >= 65 && input_char <= 90)

|| (input_char >= 97 && input_char <= 122))

cout << " Alphabet ";

// CHECKING FOR DIGITS

else if (input_char >= 48 && input_char <= 57)

cout << " Digit ";

// OTHERWISE SPECIAL CHARACTER

else

cout << " Special Character ";

}

// Driver Code

int main()

{

char input_char = '$';

charCheck(input_char);

return 0;

}

You might be interested in
Write a question that the database will understand. Which records do not contain "sold"?
astraxan [27]

Answer:

b

Explanation:

b

4 0
2 years ago
How do you add a simple header that will appear in a single column on the left of a document
malfutka [58]

When adding a header, you need to double tap the top of the document.

4 0
2 years ago
Read 2 more answers
Why do people yeet yeet and ree
DiKsa [7]

Answer:

Cause they are trying to be annoying

Explanation:

Something is wrong with them :)

8 0
3 years ago
Read 2 more answers
Which of the following is a good question to ask during an informational interview?
grin007 [14]
How do you know your information is valid?
8 0
3 years ago
Read 2 more answers
What lets you change the order of events in a game?
IRISSAK [1]
B the story board editor.
8 0
3 years ago
Other questions:
  • Consider a movie database in which data is recorded about the movie industry. the data requirements are summarized as follows:
    15·1 answer
  • Which one is a run-on sentence? you get mark the brilist
    5·2 answers
  • Write a program that asks the user for the number of males and the number of females registered in a class. The program should d
    6·1 answer
  • As a computer science student, which career you will select and what do you predict about the future of that specific IT-Career.
    8·1 answer
  • Most 4 year colleges want an applicant's scores for all the following except
    12·1 answer
  • Who is willam afton from five nights at freddy
    13·2 answers
  • 30 Points!!
    13·2 answers
  • A write the result P*=++j where j is 24
    5·1 answer
  • A program that performs handy tasks, such as computer management functions or diagnostics is often called a/an ____________.
    8·1 answer
  • A system that receives drawing information from electronic cad files, prepares the printing materials, and controls the size and
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!