Write a program that will ask the user to enter a single character. Find out whether it is alphabetic, digit or special character.
Answers
Answered by
0
Explanation:
#include<iostream.h>
void main()
{char c;
cout<<"enter character:";
cin>>c;
if(isalpha(c))
cout<<"alphabet";
else if(isdigit(c))
cout<<"digit";
else
cout<<"special character";
}
Similar questions
Science,
6 months ago