»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 04-04-2004, 08:11 AM   #1 (permalink)
Registered User
 
Join Date: Mar 2004
Posts: 6
neodjandre is on a distinguished road
Gaming [Help] Number Arithmetic Sequence wanted

Hello guyz,

(For Personal reasons) I must have a text file with a simple arithmetic sequence of numbers starting from 10000 and going all the way up to 99999 seperated by commas. In other words it would look like these:

10001, 10002, 10003, ... towards the end , 99997, 99998,99999

Can anyone provide me with such a .txt. file ?? if 99999 is too much then plz try up to 59999. I spent so much time to figure out how to do this but excel wasn't helpful at all !

thanks
Andreas


Last edited by neodjandre; 04-04-2004 at 08:17 AM.
neodjandre is offline   Reply With Quote
Old 04-04-2004, 08:54 AM   #2 (permalink)
Banned
 
Siliconjunkie's Avatar
 
Join Date: Feb 2003
Location: Houston, TX
Posts: 1,595
Siliconjunkie is on a distinguished road
Send a message via AIM to Siliconjunkie
I sense homework dodging....
Siliconjunkie is offline   Reply With Quote
Old 04-04-2004, 09:01 AM   #3 (permalink)
Registered User
 
The Real Bingo's Avatar
 
Join Date: Aug 2003
Location: Southampton, PA
Posts: 810
The Real Bingo is on a distinguished road
There's a formula for this....however it is eluding me now.

When it comes to math, I learn what I have to for the grade, and when the semester is over it all leaves my head.
__________________
FESTIVUS FOR THE REST OF US!
The Real Bingo is offline   Reply With Quote
Old 04-04-2004, 09:10 AM   #4 (permalink)
Registered User
 
Join Date: Jul 2003
Location: PA
Posts: 1,609
butch81385 is on a distinguished road
Send a message via AIM to butch81385
i got from 10000 to 75535 but they are in an excel column in wordpad. trying to paste into word crashed word... if you want i can send you that but i dont know how to get them from spreadsheet column to straight line....
butch81385 is offline   Reply With Quote
Old 04-04-2004, 09:17 AM   #5 (permalink)
Registered User
 
Bones1's Avatar
 
Join Date: Oct 2001
Location: Brooks, Alberta
Posts: 315
Bones1 is on a distinguished road
I did what you asked and made a file with all the numbers from 10000 to 99999 seperated by commas. IE 10000,10001,10002 ... 99999

I actually did this in Excel. If you want it PM me.

The file is 6.5Meg

Edit - This only took me about 10 min to do
Bones1 is offline   Reply With Quote
Old 04-04-2004, 09:22 AM   #6 (permalink)
Registered User
 
Join Date: Oct 2001
Location: TOO close to Wash DC
Posts: 7,956
vass0922 is on a distinguished road
Done
Took me about 5 minutes

You should try vbscript

For i = 10000 to 99999
string = string & i & ','
Next
write to file

and no this won't work but thats the general idea
something like this?

Quote:
6775,86776,86777,86778,86779,86780,86781,86782,867 83,86784,86785,86786,86787,86788,86789,86790,86791 ,86792,86793,86794,86795,86796,86797,86798,86799,8 6800,86801,86802,86803,86804,86805,86806,86807,868 08,86809,86810,86811,86812,86813,86814,86815,86816 ,86817,86818,86819,86820,86821,86822,86823,86824,8 6825,86826,86827,86828,86829,86830,86831,86832,868 33,86834,86835,86836,86837,86838,86839,86840,86841 ,86842,86843,86844,86845,86846,86847,86848,86849,8 6850,86851,86852,86853,86854,86855,86856,86857,868 58,86859,86860,86861,86862,86863,86864,86865,86866 ,86867,86868,86869,86870,86871,86872,86873,86874,8 6875,86876,86877,86878,86879,86880,86881,86882,868 83,86884,86885,86886,86887,86888,86889,86890,86891 ,86892,86893,86894,86895,86896,86897,86898,86899,8 6900,86901,86902,86903,86904,86905,86906,86907,869 08,86909,86910,86911,86912,86913,86914,86915,86916 ,86917,86918,86919,86920,86921,86922,86923,86924,8 6925,86926,86927,86928,86929,86930,86931,86932,869 33,86934,86935,86936,86937,86938,86939,86940,86941 ,86942,86943,86944,86945,86946,86947,86948,86949,8 6950,86951,86952,86953,86954,86955,86956,86957,869 58,86959,86960,86961,86962,86963,86964,86965,86966 ,86967,86968,86969,86970,86971,86972,86973,86974,8 6975,86976,86977,86978,86979,86980,86981,86982,869 83,86984,86985,86986,86987,86988,86989,86990,86991 ,86992,86993,86994,86995,86996,86997,86998,86999,8 7000,87001,87002,87003,87004,87005,87006,87007,870 08,87009,87010,87011,87012,87013,87014,87015,87016 ,87017,87018,87019,87020,87021,87022,87023,87024,8 7025,87026,87027,87028,87029,87030,87031,87032,870 33,87034,87035,87036,87037,87038,87039,87040,87041 ,87042,87043,87044,87045,87046,87047,87048,87049,8 7050,87051,87052,87053,87054,87055,87056,87057,870 58,87059,87060,87061,87062,87063,87064,87065,87066 ,87067,87068,87069,87070,87071,87072,87073,87074,8 7075,87076,87077,......
,88102,88103,88104,88105,88106,88107,88108,88109,8 8110,88111,88112,88113,88114,88115,88116,88117,881 18,88119,88120,88121,88122,88123,88124,88125,88126 ,88127,88128,88129,88130,88131,88132,88133,88134,8 8135,88136,88137,88138,88139,88140,88141,88142,881 43,88144,88145,88146,88147,88148,88149,88150,88151 ,88152,88153,88154,88155,88156,88157,88158,88159,8 8160,88161,88162,88163,88164,88165,88166,88167,881 68,88169,88170,88171,88172,88173,88174,88175,88176 ,88177,88178,88179,88180,88181,88182,88183,88184,8 8185,88186,88187,88188,88189,88190,88191,88192,881 93,88194,88195,88196,88197,88198,88199,88200,88201 ,88202,88203,88204,88205,88206,88207,88208,88209,8 8210,88211,88212,88213,88214,88215,88216,88217,882 18,88219,88220,88221,88222,88223,88224,88225,88226 ,88227,88228,88229,88230,88231,88232,88233,88234,8 8235,88236,88237,88238,88239,88240,88241,88242,882 43,88244,88245,88246,88247,88248,88249,88250,88251 ,88252,88253,88254,88255,88256,88257,88258,88259,8 8260,88261,88262,88263,88264,88265,88266,88267,882 68,88269,88270,88271,88272,88273,88274,88275,88276 ,88277,88278,88279,88280,88281,88282,88283,88284,8 8285,88286,88287,88288,88289,88290,88291,88292,882 93,88294,88295,88296,88297,88298,88299,88300,88301 ,88302,88303,88304,88305,88306,88307,88308,88309,8 8310...
__________________
<< Insert exceedingly large and overly verbose message of how 1337 you are here including full specs of every vehicle you've ever driven and PC you've owned >>
vass0922 is offline   Reply With Quote
Old 04-04-2004, 04:08 PM   #7 (permalink)
Registered User
 
elmers's Avatar
 
Join Date: Sep 2003
Location: Euroland
Posts: 397
elmers is on a distinguished road
MODULE text;
FROM FIO IMPORT File,WrLngInt,WrChar,Create,Close;
VAR i:LONGINT; textfile:File;
BEGIN
textfile:=Create("file.txt");
FOR i:= 10000 TO 99999 DO
WrLngInt(textfile,i,0);
WrChar(textfile,',');
END;
Close(textfile);
END text.

Gosh doesnt anyone program in M2 anymore

(edit 10 syntax errors later)

Last edited by elmers; 04-04-2004 at 04:50 PM.
elmers is offline   Reply With Quote
Old 04-04-2004, 04:34 PM   #8 (permalink)
Registered User
 
Join Date: Mar 2004
Posts: 6
neodjandre is on a distinguished road
THANKS to everyone ! it's nice to see that everyone has a radical different approach to tackle even this simple issue ! I'm definetely OK now !
neodjandre is offline   Reply With Quote
Old 04-04-2004, 04:49 PM   #9 (permalink)
Registered User
 
elmers's Avatar
 
Join Date: Sep 2003
Location: Euroland
Posts: 397
elmers is on a distinguished road
Email me your email and ill email you your file.
elmers is offline   Reply With Quote
Old 04-04-2004, 04:54 PM   #10 (permalink)
Registered User
 
Join Date: Mar 2004
Posts: 6
neodjandre is on a distinguished road
thanx elmers but I'm already sorted ;-)
I'm glad that you are willing to help me though maybe next time when i come up with sth harder
neodjandre is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 03:53 PM.