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.

5th Aug 2017, 12:11 PM
kenn lingcay
kenn lingcay - avatar
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;
5th Aug 2017, 12:16 PM
Andrés04_ve
Andrés04_ve - avatar
0
char character = 'A'; cout << (int)character;
5th Aug 2017, 12:19 PM
LordGhostX
LordGhostX - avatar