Not sure what I'm doing wrong. Please help me debug this. Using C. Ch compiler.
Code:
#include <stdio.h> /* standard IO library routines, like printf, scanf */
int main(void)
{
char length_unit[30];
float conversion_factor, equal_distance, newmiles;
printf("Enter the name of the length unit you want to convert to> ");
scanf("%s", &length_unit);
printf("You entered: %s\n", length_unit);
printf("Enter the conversion factor> ");
scanf("%f", &conversion_factor);
printf("You entered a converison factor of %.4f%s/mile\n", conversion_factor, length_unit);
printf("Enter the distance in miles > ");
scanf("%f", &newmiles);
printf("You entered: %.4f miles \n", newmiles);
equal_distance = coversion_factor / newmiles;
printf("The equivalent distance is %f\n", equal_distance);
return 0;
}