hi i'm new here, i just started a class for C++ and i need a little help.
can somebody give an example in a program how to take a 2 given numbers, one as a numerator and one as a denominator, and place it in fractional form?
ie...type in 1 for numerator and 2 for denominator and then display the result as
1
-
2
i need 3 programmer-defined functions: count_digits, print_fraction and print_line.
the number of "-" between 1 and 2 needs to coordinate with the biggest number of either the numerator or denominator.
thanks for any help
Well, basically, just take both of the numbers into strings, then make a function count_digits that returns the .size() of the strings. Then you can compare those numbers and print it out.