Yea I am using borland 5.5 and compiling it in dos. It was just that I had an example program I wanted to run, to see what the output was so I could maybe understand it better, and it included that...
Type: Posts; User: akidamo
Yea I am using borland 5.5 and compiling it in dos. It was just that I had an example program I wanted to run, to see what the output was so I could maybe understand it better, and it included that...
ahhkay thanks, when I use it thought my compiler is saying unable to open include file unistd.h
is there anywhere I could get this to put it amond my libraries?
While I am here, I came across the library #include <unistd.h>
anyone know what it is for?
oh, I already have done o/e and o/e merge sort (i think), just need a few more.
Hi,
I am interested in implementing parallel sorting algorithms for comparison. They just have to sort a list of integers.
Though I am not very familiar with the whole area, can anyone suggest...
How do I add two arrays together into a new array?
Say I have
a1[3 5 6] and
a2[7 8 9]
and i want to add them together so I have a3 [3 5 6 7 8 9]?
oh god please why am i so dumb :(
if anyone knows where i can find sample code on an o/e merge sort, it would be great.
I don't wanna copy I just want to comprehend.
I already have my own oe sort...
is there any functions that allow me to cut or chop an array.
ahh thanks,
i see that using
a = (int*) malloc(n*sizeof(int)); helped.
I'll maybe post my full code a bit later once I work on it a bit more first.
Hiya yea I was noticing a problem with that, my original O/E sort works, without any splitting, although it isn't very correct, because:
if I have
int a[];
I get an error: size of a is...
oh but mostly pleaseee......first things first
say i have a o/e sort function.
and I want a split function that splits my array, and sends both halves to the o/e function. How do i do this?
...
Just adding.....
cus if I split the array into two say 3 5 4 7 2 8
it will end up 345 and 2 7 8
merged it will be: 3 4 5 2 7 8 or will it?
so yea its how can I get the whole list sorted?...
Hi there,
I want to adjust my o/e transposition sort algorithm, so that before it sorts the list using odd and even phases, it splits it into two first.
But i've been trying it for ages now and...
cool thanks,
also,
how do you capture the length of an int array
... if someone enters 2 1 15
cus i want to do the for loop like this:
for (i=0; i<length; i++)
or could i do the above
I'm nearly there with everything, I've been working on my program alot, and I've learnt so much from all your help thanks, couldn't have done it without.But still some trouble...
When the user...
ok figured out how to get the right answer,
after using alot of temps!
printf("\n Decryption: \n");
for (i=0; i<length; i++) {
temp2 = (double)pow(ciphertext[i],7);
temp3 =...
lol thanks very much so simple!
helped me figure out something harder tho :)
Ok, Thanks for pointing that out.
I noticed there was supposed to be a round function in the math lib, but I don't appear to have it.
I looked at another few past posts but I am still a bit...
Hey again,
is there anyway I can round up a double, like:
2367.4242 to a long 2367
Yea i figured size was the problem, The answer for 26^7 is 8031810176. I just wanted to know was there a way to get around it.
It seems you cant modulus a float or double,
and when i do this....
int i;
double temp2;
int cseven[30];
long temp3;
nope now im gettin the wrong answer again :(
ok i donno :(
int i;
double temp2;
double cseven[30];
printf("\n Decryption: \t");
for (i=0; i<length; i++) {
temp2 = pow(array1[i],7);
ok wait i have to use something larger than an int dont i?
ok
just while im in the middle of trying stuff then....
I noticed that when I have
temp = pow(array1[i],3);
it calculates the right number,
but if I have