using namespace std;
class FeetToMeters{
public :
void toMeters(double feet){
double meters;
meters = feet * 0.305;
cout << feet << " feet is " << meters << " meters" << endl;
}
};
int main()
{
FeetToMeters ftm;
double feet, meters;
cout << "Enter a value for feet: " << endl;
cin >> feet;
ftm->toMeters(feet);
}
Write a program that reads a number in feet, converts it to meters, and displays the result. One foot is 0.305 meters.
INPUT and PROMPTS.The program prompts for the feet with the message "Enter a value for feet: ".
OUTPUT . The output is of the form "x feet is y meters" where x is the number read in and y is the number of meters computed by the program .
CLASS NAMES. Your program class should be called FeetToMeters