Assignment of char and int question
What I am trying to do is have the scanner read 5 separate numbers (five times) and then output characters associated with the input number without using any kind of loop. For example, if the number 1 is input, display b, number 2 display c, number 3 display 4, etc. My best shot produces long long code. Then I had an idea (that didn't work) to do assignments of an integer = number = (char). I have tried:
int a = 1 = (char) a; and get an error mark under the number 1 thinking that if the user input a 1, it would be assigned the b character to a new variable to be printed out later. Note: I will only be using the numbers 0-9.
The result is that words would be output at the end of the program based on the numerical input/conversion to char process.
Any ideas would be greatly appreciated. Thank you.