Arithmetic/Rational/C sharp: Difference between revisions

syntaxhighlight manual update
(Fix division by zero error in code.)
(syntaxhighlight manual update)
 
Line 1:
<noinclude>{{collection|Rational Arithmetic}}</noinclude>
<langsyntaxhighlight lang="csharp">using System;
 
struct Fraction : IEquatable<Fraction>, IComparable<Fraction>
Line 174:
 
#endregion
}</langsyntaxhighlight>
Test program:
<langsyntaxhighlight lang="csharp">using System;
 
static class Program
Line 200:
}
}
}</langsyntaxhighlight>
{{out}}
<pre>6 is perfect