Search:

Type: Posts; User: euclid

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    3
    Views
    3,273

    Ohhh i see what you mean, you want the decimal in...

    Ohhh i see what you mean, you want the decimal in the same column? The mistake is that %4 is four characters, not four numbers. Change it to %5.2 and it works, remember that 10.00 is five...
  2. Replies
    3
    Views
    3,273

    I tried it and it looks all good... whats the...

    I tried it and it looks all good... whats the problem exactly?


    enter diameter to calculate radius:
    10
    diam radius

    10 5.00
    20
    diam radius
  3. Replies
    14
    Views
    1,770

    Just to say THANK YOU to everyone who replied, I...

    Just to say THANK YOU to everyone who replied, I understand it much better now. I did a little reading on union-find stuff (i found this pdf quite useful) and I've managed to use it correctly in my...
  4. Replies
    14
    Views
    1,770

    Thanks a lot, that makes it very clear

    Thanks a lot, that makes it very clear
  5. Replies
    14
    Views
    1,770

    Cheers, thats very helpful. (by the way, the...

    Cheers, thats very helpful.

    (by the way, the code is used as part of a Hoshen-Kopelman Algorithm (i got it from here) to identify and label clusters of 1's in a 2d array of 1's and 0's. I am...
  6. Replies
    14
    Views
    1,770

    Well I spoke to my professor today and he...

    Well I spoke to my professor today and he couldn't understand it either, this is clearly some sort of CS black magic that is impenetrable for physicists!

    I worked through the example stahta01...
  7. Replies
    14
    Views
    1,770

    haha, yes I am a physics student not a CS...

    haha, yes I am a physics student not a CS student, i guess i have a mathematical mindset.

    Thanks anyway, you pointed me in the right direction im sure ill get it eventually
  8. Replies
    14
    Views
    1,770

    OK, thanks for getting back to me. Forgive me...

    OK, thanks for getting back to me. Forgive me for being a bit slow, but I'm struggling to get my head around this. Let me try and explain my reasoning -

    while(labels[y] != y) checks if the...
  9. Replies
    14
    Views
    1,770

    Help me understand this while( ) statement

    Hi, I know this is probably a silly question but I am having trouble understanding a piece of code i am looking at -


    while (labels[y] != y)
    y = labels[y];


    What exactly does the...
  10. Replies
    3
    Views
    2,053

    Im still working on this one, with not much luck....

    Im still working on this one, with not much luck.

    (assuming even values of n only) I now get the correct answer using values of x=0.1 and 0.2 with a y value 0.01. Any x > 0.2 causes the program...
  11. Replies
    3
    Views
    2,053

    Thanks, i will look at this part.

    Thanks, i will look at this part.
  12. Replies
    3
    Views
    2,053

    A Recurrence Problem

    Was wondering if someone could offer me some advice..

    I am trying to evaluate sin(x) using the recurrence relation sin(ny) = 2cos(y)sin((n-1)y)-sin((n-2)y).

    The problem states that i take y =...
  13. Replies
    21
    Views
    8,241

    I cant see what else i can do to them, arrrg i...

    I cant see what else i can do to them, arrrg i think ill just give it in as it is, at least i gave it a go. Thanks to all who replied




    #include <stdio.h>

    void generatePrices(float...
  14. Replies
    21
    Views
    8,241

    i think ive sorted that out... now on to the next...

    i think ive sorted that out... now on to the next one :rolleyes:

    i now get told that 'called object is not a function' for the following line from main



    else{
    ...
  15. Replies
    21
    Views
    8,241

    ....hmmm, that may well be the problem... thanks...

    ....hmmm, that may well be the problem... thanks :s
  16. Replies
    21
    Views
    8,241

    I'm still struggling with this one im afraid ...

    I'm still struggling with this one im afraid :confused:
    Heres my revised code..
    My (current) problem is that im getting 'syntax error before float' for the line in red.. I've tried changing it...
  17. Replies
    21
    Views
    8,241

    ahhh thanks

    ahhh thanks
  18. Replies
    21
    Views
    8,241

    thanks, i'll give it a go. For some reason the...

    thanks, i'll give it a go.

    For some reason the compiler is now giving me a different error, its saying
    "[Warning] statement is a reference, not call, to function `generatePrices' ", im at a loss...
  19. Replies
    21
    Views
    8,241

    The assignment is to write a program containing 3...

    The assignment is to write a program containing 3 fuctions, main, a function to fill the array and one to work out the average share price between startDay and endDay which are entered by the user.
    ...
  20. Replies
    21
    Views
    8,241

    Thanks, i hadn't noticed that

    Thanks, i hadn't noticed that
  21. Replies
    21
    Views
    8,241

    I'm trying to do that atm, but keep getting...

    I'm trying to do that atm, but keep getting various errors.. If i haven't got any further in a hour or so i'll post my attempt and the errors.
    Thanks for the help, i know noobish questions are...
  22. Replies
    21
    Views
    8,241

    Sorry, my fault i should make it clearer. I need...

    Sorry, my fault i should make it clearer. I need a fluctuation of 0.5 from the start price (ie, if start price is £1, prices between 50p and £1.50.

    Regardless of the questionable maths, would...
  23. Replies
    21
    Views
    8,241

    Filling an array with random numbers

    Ok, another week, another assignment, another question

    I'm trying to write a program that will track a share price, and to do so need to fill an array with random fluctuations, say 0.5 either...
  24. Replies
    13
    Views
    2,024

    thanks for all the help, this is the finished...

    thanks for all the help, this is the finished code, which now tests itself and prints out the results..

    #include <stdio.h>

    int howManyDays ( int fromMonth, int toMonth ); //declare numDays...
  25. Replies
    13
    Views
    2,024

    ahhh think i got it, its compiled now at least ...

    ahhh think i got it, its compiled now at least



    #include <stdio.h>

    int howManyDays ( int fromMonth, int toMonth ); //declare numDays function

    int main () //Start of main function
    {
Results 1 to 25 of 32
Page 1 of 2 1 2