I am currently in a C++ course..
I wrote a test today, and as part of the test I had ta make a function that would convert a length in meters(1 variable) , to both FEET and INCHES...(2 variables)
i managed to get the result errm partially right...
I don't have a copy of my solution but my answers were rounded off... which they shouldn't be...
I was stumped even as far as variable declaration went...
The length in meters i declared as double.
my solution resembled this...
double meters;
int b,c;
double a,d;
a = meters *39.37; //(or whatever the conversion factor is)
b = a % 12;
c = a/12;
bah memory suffering. The part I know I got wrong was that the inches should go to at least 1 decimal... my results of course were rounded.
Can any of yas offer a solution?
SKurj