Computer Science, asked by ayeshaminna200385, 3 months ago

Write a C++ program input a character and check it is * or not​

Answers

Answered by Anonymous
2

C++ Program to check whether a character is Alphabet or Not

#include <iostream>

using namespace std;

int main() {

char c;

cout << "Enter a character\n";

cin >> c;

if((c >= 'a'&& c <= 'z') || (c >= 'A' && c <= 'Z')) {

cout << c << " is an Alphabet.";

} else {

cout << c << " is not an Alphabet.";

}

return 0;

}

hope it helps

Similar questions