On Fri, 3 Jan 2003, khsweb@idaho.tds.net wrote: > Just looking for something simple, increments as you go would be great. > If you want an example, the thing i had in mind was this: > lvl 2 - 3000 > lvl 3 - 6000 > lvl 4 - 10000 > lvl 5 - 14000 > lvl 6 - 19000 > lvl 7 - 25000 > lvl 8 - 33000 > lvl 9 - 41000 > lvl 10 - 50000 (untested code, ported from a quick perl thiny I whipped up--it should match your scale a little more closely) <--------snip----------> #define LEVELS 10 int i; int exp[15]; exp[0]=1000; exp[1]=3000; for (i=2; i<LEVELS; i++) { exp[i]= exp[i-1] + 1000*(1+i); } for (i=0; i<LEVELS; i++) printf("%d", i, exp[i]); <--------snip----------> Produces this scale: 1000 (level 0) 3000 6000 10000 15000 21000 28000 36000 45000 55000 (level 9) Here's the perl I wrote if anyone cares. :-) perl -e '@x=(1000,3000); print "$x[0]\n$x[1]\n"; foreach $i (2..15) {$x[$i]=$x[$i-1]+(1+$i)*1000; print "$x[$i]\n"}' --Hawson -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | | Newbie List: http://groups.yahoo.com/group/circle-newbies/ | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 06/26/03 PDT