rational numbers

This is a discussion on rational numbers within the C++ Programming forums, part of the General Programming Boards category; Hi, I was just wondering: is there any way to change decimal numbers (like 0.25) into fractions (like 1/4)? Thanks....

  1. #1
    Unregistered
    Guest

    rational numbers

    Hi,

    I was just wondering: is there any way to change decimal numbers (like 0.25) into fractions (like 1/4)?

    Thanks.

  2. #2
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    There was a bunch of threads about how to convert them. Find this on the board and then create your own driver program.



    TIP: use nested loops for numerator and denominator

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Rational Numbers Assignment Adding
    By CaliJoe in forum C++ Programming
    Replies: 4
    Last Post: 04-30-2009, 12:37 AM
  2. Help with Rational Numbers (C++)
    By cloudjc in forum C++ Programming
    Replies: 3
    Last Post: 04-28-2008, 05:03 PM
  3. Logical errors with seach function
    By Taka in forum C Programming
    Replies: 4
    Last Post: 09-18-2006, 06:20 AM
  4. the definition of a mathematical "average" or "mean"
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 12-03-2002, 11:15 AM
  5. How to deal with repeating rational numbers
    By carrja99 in forum C++ Programming
    Replies: 2
    Last Post: 10-21-2002, 12:33 PM

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