#include <stdio.h>
int main(void)
{
double height; //Error happens if I write double height instead of float height!
printf("Height(inch): ");
scanf("%f",&height);
printf("%f inch = %f cm \n",height,height*2.54);
}
As you can see in the comment, error happens if I write double height instead of float height! What's wrong with my code?