Search:

Type: Posts; User: whiterebbit

Search: Search took 0.01 seconds.

  1. Replies
    21
    Views
    4,389

    Hello again laserlight cheers for your help. I...

    Hello again laserlight cheers for your help. I am doing Project Euler problems to learn c++ the current problem is:

    The prime factors of 13195 are 5, 7, 13 and 29.

    What is the largest prime...
  2. Replies
    21
    Views
    4,389

    Prime numbers

    My code is written to find prime numbers from 2 to num. The code outputs every value of x, once if it is prime and more if it is not. I would like to know how to just output prime numbers. I am new...
  3. Replies
    9
    Views
    2,310

    cheers

    cheers
  4. Replies
    9
    Views
    2,310

    Thank you very much that has solved it. Could you...

    Thank you very much that has solved it. Could you please explain the C++ code indenting rules so I can post it correctly in forums.
  5. Replies
    9
    Views
    2,310

    laserlight thanks for the response. Could you...

    laserlight thanks for the response. Could you please explain what
    [code]
    int y = static_cast<int>(pow(x, 2) + 0.0001);
    [/code ]
    actually does, I think I understand it but it would help so I...
  6. Replies
    9
    Views
    2,310

    pow command

    Have you run it on your computer it still gives 5^2=24 does it give the same answer on yours.
  7. Replies
    9
    Views
    2,310

    pow command

    I'm a really newbie to programming so sorry if this is a silly question. But why does my code produce 1 less for 5^2 and for all multiples of 5 eg 5^2=24 and 10^2=99.



    #include <iostream>...
  8. Project Euler Solved but want help improving the code Newbie

    Hey a friend introduced me to Project Euler and having fun solving there problems. I'm a really newbie and only been programming for 5 days now so please explain everything like you would to child....
Results 1 to 8 of 8