+ 1

Can Anyone Make An Alpha Numeric Converter?But With A Twist!

We Know That Alpha Numeric Converter Are Of Two Types I.e,1]Input Letter A and get 1 in return ;Though This Is Easy, But Im Confused On How To Make The Opposite I.e,the 2nd One]Input Number 1 and get A.Can Anyone Help Me With That?Please In c++.

25th Jul 2018, 4:21 PM
Legend Xtreme 79
Legend Xtreme 79 - avatar
5 Answers
+ 5
Alternatively you can also convert the input into its alphabetical representation by using ASCII code. #include <iostream> int main() { int num; // Read on until no more input while(std::cin >> num) { // Only accept a range of 1 ~ 26 if(num > 0 && num < 27) // Replace 64 with 96 to get the // lowercase alphabets std::cout << char(num + 64) << "\n"; } }
25th Jul 2018, 6:14 PM
Ipang
+ 2
You're welcome Legend Xtreme 79 : )
26th Jul 2018, 12:34 AM
Ipang
+ 1
Thanks!
25th Jul 2018, 4:28 PM
Legend Xtreme 79
Legend Xtreme 79 - avatar
+ 1
pretty good idea ipang
25th Jul 2018, 11:30 PM
Legend Xtreme 79
Legend Xtreme 79 - avatar
+ 1
thanks
25th Jul 2018, 11:30 PM
Legend Xtreme 79
Legend Xtreme 79 - avatar