Arithmetic/Rational/C sharp: Difference between revisions
syntaxhighlight manual update
(added C# solution) |
(syntaxhighlight manual update) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1:
<noinclude>{{collection|Rational Arithmetic}}</noinclude>
<
struct Fraction : IEquatable<Fraction>, IComparable<Fraction>
Line 11:
if (num == 0)
{
denom =
}
else if (denom == 0)
Line 174:
#endregion
}</
Test program:
<
static class Program
Line 201 ⟶ 200:
}
}
}</
{{out}}
<pre>6 is perfect
28 is perfect
|