hey guys im tryin to do a conversion program im trying to convert pounds to kilograms i input 10 pounds and 4 ounces and it gives me a total of 4.65 kilograms but i want to split that up so it says kilograms and grams so it would be like 4.00 kgms and 649.33 gms what i wanna know is how do you output the .65 kilograms
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
cout << "Please enter number of pounds: ";
cin >> pounds;
cout << "Please enter number of ounces: ";
cin >> ounces;
tpds = ounces / 16;
tkgms = (tpds + pounds) / 2.2046;
toun = (tpds + pounds) % 2.2046;
cout << "Kilograms: " << tkgms << endl;
cout << "For " << pounds << " pounds and ";
cout << ounces << " ounces:" << endl;
cout << "Conversion is: " << floor(tkgms) << " kilograms and ";
cout << toun << " grams.\n";