(12C) Check if given number is Prime Number or not
|
09-10-2018, 08:49 AM
(This post was last modified: 09-10-2018 09:02 AM by Gamo.)
Post: #1
|
|||
|
|||
(12C) Check if given number is Prime Number or not
Program to check if the given number is Prime Number or Not.
1 Display is Yes this is a prime number 0 Display is No this is not a prime number Procedure: n [R/S] display 0 or 1 [X<>Y] your given number Example: 199 [R/S] display 1 // Yes this is a prime number [X<>Y] display 199 153 [R/S] display 0 // No this is not a prime number [X<>Y] display 153 Program: Code:
Remark: The larger the number the longer time it takes to give result even on HP-12C+ when the display show "running" and keep going that always is a prime number since the result when it is not a prime number will show 0 instantly. On the HP-12C emulator this program run extremely fast. Gamo |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)