Computer Science, asked by BrainlyHulk, 1 year ago

Write a program to find whether the given character is a digit or letter

C++ || Class 11

Answers

Answered by yesiamin6
1

Answer:

#include <iostream>

int main()

{

char input_char ;

cout<<"ent the character\n" ;

cin>>input_char;

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

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

cout << " Alphabet ";

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

cout << " Digit ";

else

cout << " Special Character ";

return 0;

}

Explanation:

//hope it helps you. Do follow for more programs

Similar questions