0
Function
c++ function that let me input numbers from 0-35, and the output would be: from 0-9 display its specific number, and from 10-35 the output would be from A-Z.. example: 10=A; 11=B; 12=C; 13=D;...35=Z; if possible without using array. please help and thanks.
2 odpowiedzi
+ 3
int n;
cin << n;
if (n>35||n<0) return 1;
else if (n>9) cout << char(55+n);
else cout << n;
0
char character = 'A';
cout << (int)character;