Hi, I am currenlty updating a calculator that I made a while ago. Here is part of the code

printf("\nWould you like to see the instructions (y) or (n): ");
scanf(" %c", &answer); // gets users answer of yes or no
while ((toupper(answer) != 'Y') || (toupper(answer) != 'N'))
{ printf("\nPLease enter Y or N: ");
scanf(" %c", &answer); // Makes sure user enters a y or n
}
if (toupper(answer) == 'Y')
{prinntf("Instructions")
}
if (toupper(answer) =='N')
{ printf("Fine! \n");
}
/*********************/
then the program continues here...
Is there a way for me too loop using 'while' to make sure the user inputs a number when asked for it?for example:

printf("\nEnter calculation: ");
scanf(" %f", &amount1); //gets the first digits
scanf(" %c", &symbol); //gets calc symbol /*Must be in this order form*/
scanf(" %f", &amount2); //gets the last digits
if (symbol == '/')
{ total = amount1 / amount2; //divides 1st and 2nd amount
printf("The total is %f. \n", total);
}

can i use something for example:
while (amount1 != ANUMBER)
{do this} // so the program can make sure the user inputs a number, and nothing else but a number...
Becuase if they input anything else it comes upt with bad results... Can anyone help me ? thanks