Thread: how to solve with fraction

  1. #1
    Registered User
    Join Date
    Aug 2008
    Posts
    1

    how to solve with fraction

    i have a problem with C programing...
    how can i make a program while the inputs is fraction, out put also fraction...
    and the output must be the simplified form....

    and in this program i can do simple addition,subtraction,multiplication and devision with the inputs...

    can anyone teach me please...thanks in advance...

  2. #2
    Registered User Peritus's Avatar
    Join Date
    Aug 2008
    Posts
    3
    What do you mean by:
    while the inputs is fraction
    ?
    do you get two integers representing the numerator and denominator or just a double?

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Useful terms to google with are "lowest common multiple" and "greatest common divisor"
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. help with fraction division function
    By trippedwire in forum C++ Programming
    Replies: 6
    Last Post: 10-24-2004, 11:38 AM
  2. A tragedy!
    By Aakash Datt in forum C++ Programming
    Replies: 4
    Last Post: 05-01-2003, 06:57 PM
  3. Overloading insertion and extraction problem
    By Curwa in forum C++ Programming
    Replies: 1
    Last Post: 01-15-2003, 09:20 PM
  4. Help with Fraction class
    By cheeisme123 in forum C++ Programming
    Replies: 0
    Last Post: 06-04-2002, 07:48 AM
  5. reducing a fraction
    By Unregistered in forum C Programming
    Replies: 4
    Last Post: 03-13-2002, 08:56 PM