How can I make the switch-case statement case insensitive? Say I did something like this:
#include <stdio.h> char choice; int main () { char choice; printf("Will you choose A,B, or C?\n>"); scanf(" %c", &choice); switch(choice) { case 'A': printf("The First Letter of the Alphabet"); break; case 'B': printf("The Second Letter of the Alphabet"); break; case 'C': printf("The Third Letter of the Alphabet"); break; } }
He will respond only in capital letters. How to make him respond to lowercase letters?
source share