how to solve with fraction

This is a discussion on how to solve with fraction within the C Programming forums, part of the General Programming Boards category; i have a problem with C programing... how can i make a program while the inputs is fraction, out put ...

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,452
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

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, 08: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, 07:56 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21