View Single Post
Old 05-22-2008, 12:43 AM   · #7
Palyriot
NamePros Regular
 
Palyriot's Avatar
 
Name: Derek
Location: Seattle, Wa
Trader Rating: (14)
Join Date: Jul 2004
Posts: 597
NP$: 69.00 (Donate)
Palyriot is a jewel in the roughPalyriot is a jewel in the roughPalyriot is a jewel in the rough
Originally Posted by Dreads
Wouldnt it bee better to replace $k = 1 to $k = $level ?
<?php
for($k = 1; $k <= 1000; $k++)
{
$exp = (3/4) * ((50/3) * pow($k, 3) - 100 * pow($k, 2) + ((850/3) * $k) - 200);
echo $k.": ".$exp."<br>";
}
?>



If you mean changing $k to $level, then that's just preference. That won't change the program, just the code. If you mean physically changing $k = 1 to $k = $level, the variable $level isn't initialized yet. It would most likely just be the same as $k = 0.


Please register or log-in into NamePros to hide ads
Palyriot is offline   Reply With Quote
Site Sponsors
Grow your forum! Buy Flash Arcade Game Script NameChatter
Advertise your business at NamePros
All times are GMT -7. The time now is 03:01 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.