Saturday, January 21, 2017

program to convert the feet to meters

Q:
Create a program that converts feet to meters. The program prompts the user for the number of feet. It then displays that value converted into meters. A meter is equal to approximately 3.28 feet.


sol.
// program to convert feet to meters
#include <iostream>
using namespace std;
int main()
{
float meter, feet;
cout << "Enter the number of feet" << endl;
cin >> feet;
meter = feet / 3.28;
cout << "The " << feet << "  feet =  " << meter << "   meter" << endl
<<"Thanks for using our units converter......\n";
return 0;
}