/* Prompts the user for weight in pounds, then converts to Stones/pounds and kg. */ #include /* Convert U.S. Weight to Imperial and International Units. Print the results */ void print_converted(int pounds) { int stones = pounds / 14; int uklbs = pounds % 14; float kilos_per_pound = 0.45359; float kilos = pounds * kilos_per_pound; printf(" %3d %2d %2d %6.2f\n", pounds, stones, uklbs, kilos); } int main() { int us_pounds; printf("Give an integer weight in Pounds : "); scanf("%d", &us_pounds); printf(" US lbs UK st. lbs INT Kg\n"); print_converted(us_pounds); return 0; }