(Program) a. Write a C++ program to convert meters to feet. The program should request the
starting meter value, the number of conversions to be made, and the increment between metric
values. The display should have appropriate headings and list the meters and corresponding
feet value. If the number of iterations is greater than 10, have your program substitute a
default increment of 10. Use the relationship that 1 meter = 3.281 feet.
b. Run the program written in Exercise 6a on a computer. Verify that your program begins at
the correct starting meter value and contains the exact number of conversions specified in
your input data.
here is what have so far
#include<iostream>
#include <iomanip>
using namespace std;
// a programs to convert meter to feet
int main()
{
const int MAXMETER = 10;
const int STARTVAL = 1;
const int STEPSIZE = 1;
int meter;
double feet;
cout << "Meter Feet\n"
"------- -----\n";
meter = STARTVAL;
// set output for formats for floating-point numbers only
cout << setiosflags (ios::showpoint) << setiosflags(ios::fixed)
<< setprecision(2);
while (meter <= MAXMETER)
{
feet = (3.281) * meter;
cout << setw(4) << meter
<< setw(13) << feet << endl;
meter = meter + STEPSIZE;
}
system ("PAUSE");
return 0;
}
i dont know how to have a setup where you input the values, and then will be provided the output. i literally scoured my book for info on it