Algorithm

Im trying to create an algorithm that continually reads (loops) a single character from the user and, regardless of the input, displays the ordinal (ASCII) value of the character. If the character is alphabetic, program should also change the case of the character (so if it is an 'a' change to an 'A' and vice-versa) and then display the new ordinal and character values.The program should quit when the user enters the '#' character. The program should display an appropriate message if a non-alphabetic character is entered.

Im not sure how to do it
Thank you
https://www.cplusplus.com/reference/istream/istream/get/
1
2
3
4
char c;
while ( cin.get(c) && c != '#' ) {
  // do stuff
}
Topic archived. No new replies allowed.