//18. Lee un carácter e indica si es letra mayúscula, minúscula, dígito u otro.
#include <iostream>
using namespace std;
int main() {
// Write C++ code here
std::cout <<"PROGRAMA QUE LEE UN CARACTER E INDICA SI ES MAYUSCULA, MINUSCULA, DIGITO U OTRO"<<endl;
char caracter;
cout<<"ingrese un caracter "<<endl;
cin>>caracter;
if((caracter>=48)&&(caracter<=57))
{
cout<<"REPRESENTA UN NUMERO DEL 0 AL 9"<<endl;
}else if ((caracter>=65)&&(caracter<=90))
{
cout<<"REPRESENTA UNA LETRA MAYUSCULA"<<endl;
}else if ((caracter>=97)&&(caracter<=122))
{
cout<<"REPRESENTA UNA LETRA MINUSCULA"<<endl;
}else
{
cout<<"REPRESENTA OTRO"<<endl;
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: