#include <iostream>

using namespace std;

int main()
{
    double f;
    double m;
    
    cout<< " enter Length in Feet";
    cin>>f;
    
    m = f/3.28;  // Convert To Meters
    cout << f << "feet is" << endl << m << "Meter's" << endl;
    
    
    system("pause");
    return 0;
}
3
Contributors
2
Replies
4
Views
7 Years
Discussion Span
Last Post by Foamgum
0

You can improve your code by using an exact conversion instead of the approximate one that you have used.

m = f/3.28;   // This is an approximate conversion.
m = f*0.3048;    // This is an exact conversion.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.