A prime number is a number that is only evenly divisible by itself and 1. For ex
ID: 3531666 • Letter: A
Question
A prime number is a number that is only evenly divisible by itself and 1.
For example, the number 5 is prime because it can only be evenly divided by 1 and 5.
The number 6, however, is not prime because it can be divided evenly by 1, 2, 3, and 6.
Design a Boolean function named isPrime which takes an integer as an argument and returns True if the argument is a prime number, or False otherwise.
Use the function in a program that prompts the user to enter a number and then displays a message indicating whether the number is prime.
I have everything except the function. very confused about this. Please help! Its for an introduction to Programming and logic class so just pseudocode please (no python, c++ etc.)
Explanation / Answer
Function main
//No arguments passed to main function
Pass In: nothing
//Declare variables
Declare Integer number
Declare Boolean result
//Get the number
Display
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.