How to Determine if a Number is a Prime Number by Writing a Computer Program , C++ , Part 2

Поділитися
Вставка
  • Опубліковано 5 лип 2024
  • This tutorial is part 2 of a playlist showing how to determine if a number is prime or not by writing a C++ program.
    Join this channel to get access to perks:
    / @learnmathtutorials
    :)

КОМЕНТАРІ • 5

  • @devonlong7590
    @devonlong7590 8 років тому +3

    Hey Paul,
    thanks for the explanation! Quick question, why use sqrt(number) as the loop's test expression?

    • @bitsnnbytes
      @bitsnnbytes 7 років тому

      yes it should be the original number

    • @chaouchsamir3635
      @chaouchsamir3635 6 років тому

      yup you are right, it is weird to use the sqrt, and i think it is better to use (number/2)

  • @markpeynado9013
    @markpeynado9013 8 років тому

    Perhaps a silly question Windows 10 is asking what program to use to execute this program. Is there another application that I need to install?

  • @beachboybali7925
    @beachboybali7925 9 років тому

    can you please give me the code