I enter 5.08c. Output empty
#include <stdio.h> int main() { int x; float x1; char ch; scanf("%f%c", &x1, &ch); if ((x1 == 5.08) && (ch == 'c')) printf("%5.3f \n", x1 / 2.54); //5.08cm = 2" } Compare 5.08 and the symbol 'c'. Where is the mistake? Both must give the truth.