Arithmetic/Rational/C: Difference between revisions
m
Fixed syntax highlighting.
m (typofix) |
m (Fixed syntax highlighting.) |
||
Line 2:
C doesn't support classes, so a series of functions is provided that implements the arithmetic of a rational class.
<
#include <stdlib.h>
#include <string.h>
Line 241:
rzlt->denominator = abs(l->denominator); // should already be nonnegative
return rzlt;
}</
Testing
<
{
int n, n2, k;
Line 312:
find_perfects();
return 0;
}</
|