C Program Meters to Feet

By | March 6, 2020

C Program Meters to Feet

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

  printf("Enter the value for meters=");
  scanf("%d", &meters);

  feet = meters * 3.28084;

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

  return 0;
}

Output
Enter the value for meters=20
20 meters are equal to 65.62 feet
Press Enter to return to Quincy…

Leave a Reply

Your email address will not be published. Required fields are marked *