Is there a way to take numbers after a decimal and put them into a completely new category? (i.e. the conversion of feet to meters. Typically it would result in (feet * .3048) => (4 * .3048) = 1.2192 or 1 meter 21.91 centimeters), Is there a way to tell my program to assign the "1" to meters and place the "21.91" in a centimeters column that I create?
Thank you very much for the response Chervil. Is there a way for me to create a function that will utilize that formula?
Would something like this work?
1 2 3 4 5 6 7 8
double Conversion (double feet, double ftom, double meters, double cm)
double meters = feet * ftom;
int m = meters;
int cm = (meters - m) * 100;
I'm basically trying to allow a user to input a number for feet/inches to be converted to meters/cm. My current coding allows for a user to get the calculations but will not convert the numbers following the decimal in "feet" to centimeters.