Using switch-case statements!
So I am trying to create a program that will take an integer from the user if they enter 'E' or 'e' from the menu. So my code looks like this:
Code:
// Menu options: C, c, D, d, E, e and saves the option to user1
switch (user1)
{
case 'E':
printf ("\nPlease enter an integer number: ");
scanf ("%d", &user2);
}
The question is: Can I do something like...
Code:
switch (user1)
{
case 'E' || case 'e'
printf ("\nPlease enter an integer number: ");
scanf ("%d", &user2);
}
If not, what might be a way of doing that but without If-Else statements?