Skip to content

Commit

Permalink
Update mzpp19.c
Browse files Browse the repository at this point in the history
  • Loading branch information
matteo65 authored Nov 4, 2023
1 parent b516024 commit e3d9931
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/mzpp19.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,35 +121,31 @@ void findPalindrome64(void)
do {
checkPalindrome(n);
n += 10;
}
while(n < d);
} while(n < d);

// Find palindrome prime starting with 3
n += 2;
d = number << 2;
do {
checkPalindrome(n);
n += 10;
}
while(n < d);
} while(n < d);

// Find palindrome prime starting with 7
n += 4;
d = number << 3;
do {
checkPalindrome(n);
n += 10;
}
while(n < d);
} while(n < d);

// Find palindrome prime starting with 9
n += 2;
d = number * 10;
do {
checkPalindrome(n);
n += 10;
}
while(n < d);
} while(n < d);

number *= 100;
}
Expand Down

0 comments on commit e3d9931

Please sign in to comment.