Miles,Inches,meters,feet conversion

This is what i have to do:


Output each of the sub totals individually. Then output the grand total

Units Value Meters

Miles 3 miles xxx.xx
Yards 105 yards xxx.xx
Feet 235 feet xxx.xx
Inches 11 inches xxx.xx

Total xxx.xx xxx.xx



#include <iostream>
#include <iomanip>
using namespace std;

int main () {
double f =3.14159;
cout << fixed;
cout << setprecision(2) << f << endl;


problem is i have no clue as to how to do it, if anyone could even give me a head start on this it would be glaaaaaadly welcomed!!

Thanks

Last edited on
If there's 39.37 inches to 1 meter, then

1 m
-------- * 11 in = 0.28 m.
39.37 in


Unit conversion factors are easy to find on the internet for the rest, but that gives you an idea how to do the conversions.
I'll give it a try with this thank you
Topic archived. No new replies allowed.