var $number = 1234
var $thousands = 1
var $hundreds = 2
var $tens = 3
var $ones = 4

switch ($thousands)
{
case: 1: $thousandstring = "One thousand "; break;
case: 2: $thousandstring = "Two thousand "; break;
case: 3: $thousandstring = "Three thousand "; break;
// etc
}

switch ($hundreds)
{
case: 1: $hundredsstring = "One hundred "; break;
case: 2: $hundredsstring = "Two hundred "; break;
// etc
}

// do the same for the tens and ones

// finally, concat the four strings you got:
$result = $thousandstring + $hundredsstring + $tensstring + $onesstring;

hey i know this will work in C/C++ but plz tell me what header files i'll require to run this program especially "var"!!!!!

do tell me
thnx anyway!