Advertisement
Cnvmendoza

Input Number Letter Special

Oct 24th, 2021
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main(){
  4.     char input;
  5.     cout << "Enter a Character: ";
  6.     cin >> input;
  7.     if (isdigit(input))
  8.         cout << input << " is a number.";
  9.     else if (isalpha(input))
  10.         cout << input << " is a letter.";
  11.     else
  12.         cout << input << " is a special character.";
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement