C examples for Data Type:float
Do Multiplication for your input value
#include <stdio.h> #include <stdlib.h> int main()// w w w . ja v a 2 s . c o m { float height_in_cm; char height_in_inches[4]; printf("Enter your height in inches:"); gets_s(height_in_inches); height_in_cm = atoi(height_in_inches)*2.54; printf("You are %.2f centimeters tall.\n",height_in_cm); return(0); }