Or login with:
| doubledollar_fraction( | double | decPrice | |
| int | frac | ) |
#include <stdio.h> #include <codecogs/finance/banking/dollar_fraction.h> int main() { double d = Finance::Banking::dollar_fraction(1.38, 8); printf("The decimal price $1.38 as fractional (8 denominator) = %.1f\n", d); return 0; }Output:
The decimal price $1.38 as fractional (8 denominator) = 1.3
| decPrice | is the decimal price. |
| frac | is the denominator required for the fraction output. |
Source code is available when you agree to a GP Licence or buy a Commercial Licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.
You must login to leave a messge