Posted:

**Wed Jan 11, 2006 9:37 am**// gen

@cid "Gene";

@name "Gen";

@dbname "Gen";

@category "Utilities";

@ver "1.0";

main() {

int i,j,h,w;

int no[44];

do

{

gets(w);

if (w == 100)

{

for (i = 1 ; i <= 44; i++)

no[i] = i;

j = 44;

}

h = random( j ) + 1;

puts(":"+no[h]+"\n");

for (i = h; i < j; i++)

no[i] = no[i+1];

j = j - 1;

if (j == 0)

puts("All generated!!");

}

while (w != 99);

}

this is my source code...but i can run it properly, can anyone help me...actually i dun know C at all...i translate pascal to it...

my logic:

read a integer (w);

if w is 100 then assign started value

gen a number

shorten range and elimilate appeared one...

if w is 99 then exit...

that mean, enter:

100:initialize+gen

99:gen then exit

other value:gen

@cid "Gene";

@name "Gen";

@dbname "Gen";

@category "Utilities";

@ver "1.0";

main() {

int i,j,h,w;

int no[44];

do

{

gets(w);

if (w == 100)

{

for (i = 1 ; i <= 44; i++)

no[i] = i;

j = 44;

}

h = random( j ) + 1;

puts(":"+no[h]+"\n");

for (i = h; i < j; i++)

no[i] = no[i+1];

j = j - 1;

if (j == 0)

puts("All generated!!");

}

while (w != 99);

}

this is my source code...but i can run it properly, can anyone help me...actually i dun know C at all...i translate pascal to it...

my logic:

read a integer (w);

if w is 100 then assign started value

gen a number

shorten range and elimilate appeared one...

if w is 99 then exit...

that mean, enter:

100:initialize+gen

99:gen then exit

other value:gen