rational numbers using structures

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sekitoleko
    New Member
    • Sep 2006
    • 21

    rational numbers using structures

    I need some help on representing rational numbers using structures
  • arne
    Recognized Expert Contributor
    • Oct 2006
    • 315

    #2
    Originally posted by sekitoleko
    I need some help on representing rational numbers using structures
    In C, you mean? What about something simple like
    Code:
    structure rational {
            int numerator;
            int denominator;
    };

    Comment

    Working...