answersLogoWhite

0

AllQ&AStudy Guides
Best answer

p and q

This answer is:
Related answers

p and q

View page

If a is rational then there exist integers p and q such that a = p/q where q>0.

Similarly, b = r/s for some integers r and s (s>0)

Then a*b = p/q * r/s = (p*r)/(q*s)

Now, since p, q r and s are integers, p*r and q*s are integers. Also, q and s > 0 means that q*s > 0

Thus a*b can be expressed as x/y where

p and r are integers implies that x = p*r is an integer

q and s are positive integers implies that y = q*s is a positive integer.

That is, a*b is rational.

View page

A rational number is a number of the form p/q where p and q are integers and q > 0.

If p/q and r/s are two rational numbers then

p/q + r/s = (p*s + q*r) / (q*r)
and

p/q - r/s = (p*s - q*r) / (q*r)


The answers may need simplification.

View page

Possible.

int cmp;

cmp= strcmp (p, q);

if (cmp<0) printf ("%s < %s\n", p, q);

else if (cmp>0) printf ("%s > %s\n", p, q);

else printf ("%s == %s\n", p, q);

View page

p/q * r/s = (p*r)/(q*s)

View page
Featured study guide
📓
See all Study Guides
✍️
Create a Study Guide
Search results