Hi,
I looking for a best way to code a program which split the a amount of money into dollars and cents.
Your help would be appreciated.Code:int main() { float money; printf("Please enter the cost: "); scanf("%f", &money); /* need a good formular here to split money into dollars and cents */ printf("The cost is %d dollars and %d cents", dollars, cents); return 0; } Input: Please enter the cost: 4.69 Output: The cost is 4 dollars and 69 cents
C-Dumbie