Search:

Type: Posts; User: Doriän

Search: Search took 0.00 seconds; generated 14 minute(s) ago.

  1. Replies
    5
    Views
    4,995

    Hi guys! Thanks for the tips, I did it quite...

    Hi guys! Thanks for the tips, I did it quite alright with your suggestions!
    I ended up reading the numbers and coping them in a bi-dimensional array. There I looped summing, storing only (sum/10) in...
  2. Replies
    5
    Views
    4,995

    Thanks! I see your point here - and to be...

    Thanks!
    I see your point here - and to be honest, I already thought of doing something like that, but left the idea when I realized I had no idea how to switch lines...now I'll think a bit about it...
  3. Replies
    5
    Views
    4,995

    Long (really long) number

    Indeed.
    So, as probably someone understood from my previous post, I'm trying to work my way out of the easiest problems listed in projecteuler.net, in an attempt to improve my coding skills and my...
  4. Replies
    23
    Views
    7,859

    I didn't know this. Thanks!

    I didn't know this. Thanks!
  5. Replies
    23
    Views
    7,859

    Done. It is indeed several times faster (I had...

    Done. It is indeed several times faster (I had already tried this method some time ago, in another exercise with prime numbers, but that time it didn't work - looks like I'll have to check that one...
  6. Replies
    23
    Views
    7,859

    SUCCESS! Thanks guys, problem solved! here's...

    SUCCESS! Thanks guys, problem solved!

    here's the final code, perhaps I could still learn something from errors I overlooked...


    /*The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.

    Find...
  7. Replies
    23
    Views
    7,859

    Oh, all right, I got your point now. Is more a...

    Oh, all right, I got your point now. Is more a "standard" issue, then, am I right? Perhaps I could use EXIT_SUCCESS and EXIT_FAILURE, as declared in stdlib.h? (meh, I believe they're declared...
  8. Replies
    23
    Views
    7,859

    You know what, guys? I think I64d made the trick....

    You know what, guys? I think I64d made the trick. I changed the printf in the loop and left unchanged the one at the end of the program. I looped up to MAX/2 (just to try it out) and the first one...
  9. Replies
    8
    Views
    1,306

    Thanks!

    Thanks!
  10. Replies
    23
    Views
    7,859

    I'm using Eclipse's CDT...

    I'm using Eclipse's CDT...
  11. Replies
    23
    Views
    7,859

    i don't get your point. My func returns 0 if is a...

    i don't get your point. My func returns 0 if is a prime, doesn't it? isn't 0 a success return value?



    yeah, I was skipping even numbers in the function, now I implemented a condition in the...
  12. Replies
    8
    Views
    1,306

    ... nombreEntree = nombreEntree * 10 + (carac -...

    ...
    nombreEntree = nombreEntree * 10 + (carac - '0');



    Is this (and the others " - '0'"s) because getchar stores an ASCII?
  13. Replies
    23
    Views
    7,859

    Number too big for int64_t?

    Hi guys! I'm getting some troubles trying to find the sum of all primes below 1 million. I think I created a fairly good program (or at least one that should get the job done!), but apparently I'm...
Results 1 to 13 of 13