Can't find the error

I'm trying to do this:

palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 99.
Find the largest palindrome made from the product of two 3-digit numbers.

and this code solves it.. If and only if the variable NumberTwo is greater than 600
i'm wondering if someone can help me find the reason for this
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

#include <iostream>
const int base = 10;
	int NumberOne = 100;
	int NumberTwo = 100;
int y,CheckOne,CheckTwo,palindrome;
int main()
{

	while(NumberOne != 1000)
	{
		CheckOne = NumberOne * NumberTwo;
		CheckTwo = CheckOne;
		y = 0;
	while (CheckTwo)
	{
	y = CheckTwo % base + base * y;
	CheckTwo = CheckTwo / base;
	}

	if(CheckOne == y)
	{
		palindrome = y;	
	
	}


	if(NumberTwo == 999)
	{
		NumberTwo = 99;
		NumberOne ++;
	}
	NumberTwo++;
	}


	std::cout << palindrome << std::endl;
	
	system("pause");
	return 0;
}
Topic archived. No new replies allowed.