I was wondering how to write code that would take user input, such as 'A', and mirror that. A would be Z, B would be Y and so forth.I cannot use arrays or strings. I am reading character by character. I cannot use arrays and need to stick with loop and if statement basics essentially. thank you for any ideas or tips!
1 2 3 4 5 6 7 8
void reverseUppercase(char & alphabet)
{
/*can I use a while loop? am i doing this
wrong with if? here is the only thing I can
think of, but if it isn't Z, then it doesn't
really work right?*/
26 - alphabet + 1;
}
do I assign 65 to 90 instead and work like that (even though i dont know how i could do that)?
maybe i could assign alphabet to a rang of 1-26 so i can work from that rang?