about | help | code help+videos | done | prefs |
A number is called prime if it is more than 1, and is divisible only by 1 and itself. Define a function that when passed an integer, returns true if it is prime, false otherwise. If you are not sure where to begin, just search on wikipedia (yes, wikipedia is awesome!) for "prime numbers". isPrime(77) → false isPrime(73) → true isPrime(103) → true ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 3 Post-solution available
Copyright Nick Parlante 2017 - privacy