i need help making this little c++ program work : <p>Holy digits Batman! The Riddler is planning his next caper somewhere on Pennsylvania Avenue. In his usual sporting fashion, he has left the address in the form of a puzzle. The address on Pennsylvania is a four-digit number where:
•   All four digits are different 
•   The digits in the thousandths place is three times the digit in the tens place
•   The number is odd
•   The sum of the digits is 27
Write a program that uses a loop (or loops) to find the address where the Riddler plans to strike. </p>

<p>I'm not so sure where the program is going wrong. any help will be appreciated.</p>

<pre><code>#include &lt;iostream&gt;
using namespace std;

void splitAddress(int address, int thou, int hund, int tens, int ones) {
while (address &gt;= 1000) {
address = address - 1000;
thou++;
}
while (address &gt;= 100) {
address = address - 100;
hund++;
}
while (address &gt;= 10) {
address = address - 10;
tens++;
}
while (address &gt;= 1) {
address = address - 1;
ones++;
}
}
void areIntsTheSame(int address, int thou, int hund, int tens, int ones) {
if (thou == hund || thou == tens || thou == ones ||
hund == tens || hund == ones || tens != ones) {
address--;
}
}
void thou3tens(int address, int thou, int tens) {
if (thou != 3 * tens) {
address--;
} 
}
void evenOrOdd(int address) {
if (address % 2 == 0) {
address--;
}
} 
void Sum27(int address, int thou, int hund, int tens, int ones) {
if ((thou + hund + tens + ones) != 27) {
address--;
} 
} 
int main() {
int address = 9999;
int thou = 0;
int hund = 0;
int tens = 0;
int ones = 0;

splitAddress(address);
areIntsTheSame(address);
thou3tens(address);
evenOrOdd(address);
Sum27(address);

cout &lt;&lt; "the address is " &lt;&lt; address &lt;&lt; endl;

system("pause");
return 0;
}
</code></pre>

<p>thanks in advance. </p>
