1. Shlomi Fish
  2. project-euler

Commits

Shlomi Fish  committed 0cc7c1c

Corrected.

Now it passes the test for limit = 1,000.

  • Participants
  • Parent commits b670a25
  • Branches default

Comments (0)

Files changed (1)

File project-euler/145/euler145.c

View file
  • Ignore whitespace
         while (temp_n)
         {
             reverse = reverse * 10 + (temp_n % 10);
-            temp_n /= 10;
-            power_of_ten *= 10;
+            if (temp_n /= 10)
+            {
+                power_of_ten *= 10;
+            }
         }
 
         /*