Playground
#include <iostream> #include <cctype> using namespace std; int main() { if (isalpha('x')) //true cout << "x e bukva." << endl; if (isdigit('3')) //true cout << "3 e cifra." << endl; char ch1 = toupper('x'); //ch1 = 'X' char ch2 = tolower('3'); //ch2 = '3' cout << ch1 << endl; //pechati 'X' cout << ch2 << endl; //pechati '3' return 0; }
Input data
Program output
no input
Execute
Language: ????????? | Memory: ???? KB | Time: ??? ms
Nothing has been executed, yet!