Convert feet to meters with C language
#include <stdio.h>
int main()
{
double meter, feet;
printf("Enter feet : ");
scanf("%lf", &feet);
meter = feet / 3.2808399;
// here .2lf means it will show 2 digits after the decimal number.
printf("meter: %.2lf", meter);
return 0;
}
Output:-
Enter feet : 50
meter : 15.24
0 Comments