Arithmetic/Rational/C: Difference between revisions
m
Fixed syntax highlighting.
m (moved Rational Arithmetic/C to Arithmetic/Rational/C) |
m (Fixed syntax highlighting.) |
||
(One intermediate revision by one other user not shown) | |||
Line 1:
{{collection|Rational Arithmetic}}
C doesn't support classes, so a series of functions is provided that
<
#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;
}</
|