Back again with another rookie question. While working on a function for my homework project I found that my menu wouldn't exit when I press X, it worked just an hour ago and I haven't changed anything in main(). I commented out all the code in my functions just to be sure that nothing in a function interfered. I just can't find any problem and would be grateful for any help.
int main()
{
char val, enter;
int c;
/* loopa med do-while */
do
{
printf("===============================\n");
printf(" Olja i Norge AB\n");
printf("===============================\n\n");
printf(" Artikelregister\n");
printf(" A. Lista artiklar\n");
printf(" B. L\x84gg till artikel\n");
printf(" C. Radera artikel\n");
printf(" D. \x8Endra artikel\n\n");
printf(" Kundregister\n");
printf(" E. Lista kunder\n");
printf(" F. L\x84gg till kund\n");
printf(" G. Radera kund\n");
printf(" H. \x8Endra kund\n\n");
printf(" Ordrar\n");
printf(" I. Best\x84ll\n");
printf(" J. Lista ordrar\n\n");
printf(" X. Avsluta\n");
printf("\n===============================");
printf("\n===============================\n");
printf("V\x84lj: ");
scanf("%c", &val);
do {
c = getchar();
} while (c != EOF && c != '\n');
switch( val )
{
case 'A':
case 'a':
printf("\n");
artList();
break;
case 'B':
case 'b':
printf("\n");
artAdd();
break;
case 'C':
case 'c':
artDel();
break;
case 'D':
case 'd':
artEdit();
break;
case 'E':
case 'e':
kundList();
break;
case 'F':
case 'f':
kundAdd();
break;
case 'G':
case 'g':
kundDel();
break;
case 'H':
case 'h':
kundEdit();
break;
case 'I':
case 'i':
order();
break;
case 'J':
case 'j':
orderList();
break;
case 'X':
case 'x':
break;
}
printf("\nTryck <ENTER> f\x94r att forts\x84tta.");
scanf("%c", &enter);
system("cls");
}while(val != 'X' || val != 'x');
return 0;
}