Im trying to write a function the converts kelvin to celsius of farenheit based on a user input, i want it to keep prompting the user if they enter an invalid input but no matter the input it prints "Invalid Input" and the loop repeats even though im printing the value of y to test it and it returns as 'C' or 'F'
(ReadChar() just uses scanf and returns the character)
do
{
printf("Choose Celsius or Farenheit (F/C): ");
y = ReadChar();
y = toupper(y);
printf("%c", y);
if ((y != 'C') || (y != 'F'))
{
printf("Invalid Input\n");
}
}while ((y != 'C') || (y != 'F'));
return(y);