I've wrote this simple program which converts inches to centimetres but the float gives me some huge numbers after the decimal place. I want it to look more like for example 25.78 rather than 25.780000 or something. What should I change to make it look like that? Here is the program:
#include <stdio.h>
int main()
{
float inches, centimeters;
printf("Enter a number of inches to be converted: ");
scanf(" %f", &inches);
centimeters = inches * 2.54; // 1 inch = 2.54cm
printf("%f is equalled to %fcm\n",inches, centimeters);
return 0;
}