I have an assignment on matrix operations and I cannot figure out what is wrong in my code, that makes my program say that char is wrong, even though it is correct. Could you please help me? Thank You.
if(scanf(" %c", &symbol) == 1) //input symbol with error handling
{
if (symbol != '*' || symbol != '+' || symbol != '-')
{
printf("[%c]\n", symbol);
fprintf(stderr, "Error: Chybny vstup [Symbol]!\n");
return 100;
}
}