C Program Feet to Meters

By | March 6, 2020

C Program Feet to Meters

#include <stdio.h>
int main()
  float feet, meters;

  printf("Enter the value for Feet=");
  scanf("%f", &feet);

  meters = feet / 3.28084;

  printf("%.2f Feet are equal to %.2f Meters", feet, meters);

  return 0;


Enter the value for Feet=65.62
65.62 Feet are equal to 20.00 Meters

Another output from second sample run

Enter the value for Feet=60
60.00 Feet are equal to 18.29 Meters

 1,704 total views,  3 views today

Leave a Reply

Your email address will not be published.