#include <iostream>
#include <conio.h>
using namespace std;
class Karakter
{
private:
char karakter;
public:
void Proses ();
void Output ();
};
void Karakter::Proses()
{
cout<<"Masukkan Karakter = ";cin>>karakter;
};
void Karakter::Output(){
if (karakter >='A' && karakter <='Z')
cout<<"Huruf Besar"<<endl;
else if (karakter >= 'a' && karakter <='z')
cout<<"Huruf Kecil"<<endl;
else if (karakter >= '0' && karakter <= '9')
cout<<"Digit (Bilangan)"<<endl;
else
cout<<"Simbol"<<endl;
};
main ()
{
Karakter bilhur;
bilhur.Proses();
bilhur.Output();
getch ();
return 0;
}
Comments
Post a Comment