Skip to content

Commit a4a9f36

Browse files
committed
Add DivRem() method to C# Math Functions
1 parent bbe71bd commit a4a9f36

File tree

1 file changed

+4
-4
lines changed
  • content/c-sharp/concepts/math-functions/terms/divrem

1 file changed

+4
-4
lines changed

content/c-sharp/concepts/math-functions/terms/divrem/divrem.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ public class Example
4343
int dividend = 30;
4444
int divisor = 7;
4545
int remainder;
46-
46+
4747
int quotient = Math.DivRem(dividend, divisor, out remainder);
48-
48+
4949
Console.WriteLine($"Dividend: {dividend}");
5050
Console.WriteLine($"Divisor: {divisor}");
5151
Console.WriteLine($"Quotient: {quotient}");
@@ -78,12 +78,12 @@ public class Program
7878
int remainder1;
7979
int quotient1 = Math.DivRem(100, 13, out remainder1);
8080
Console.WriteLine($"100 divided by 13 = {quotient1} remainder {remainder1}");
81-
81+
8282
// Example with larger numbers using long
8383
long remainder2;
8484
long quotient2 = Math.DivRem(1000000L, 777L, out remainder2);
8585
Console.WriteLine($"1000000 divided by 777 = {quotient2} remainder {remainder2}");
86-
86+
8787
// Example with negative dividend
8888
int remainder3;
8989
int quotient3 = Math.DivRem(-25, 4, out remainder3);

0 commit comments

Comments
 (0)