tcl.prime
Displays prime number.
Syntax
prime {number}
Description
calculates the next higher and lower prime number from a given number.
If no number is provided with the command, the program requests it.
Example
prime 13
13 is a prime number
the next highest prime number is = 17
the next lowest prime number is = 11
prime 14
the next highest prime number is = 17
the next lowest prime number is = 13
prime<return>
PRIME - computes the next greater prime number
Enter a positive integer = 13<return>
13 is a prime number
the next highest prime number is = 17
the next lowest prime number is = 11
See Also
User Comments
What do you think?
Share your experience or ask a question by using the form below.
Login to leave your comments.
