Created
August 12, 2021 05:01
Revisions
-
ikyamelia created this gist
Aug 12, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ function PrimeTime(num) { for (let i = 2; i < num; i++) { if (num % i === 0) { return false } } return true; } // keep this function call here console.log(PrimeTime(readline())); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ # Prime Time Have the function PrimeTime(num) take the num parameter being passed and return the string true if the parameter is a prime number, otherwise return the string false. The range will be between 1 and 2^16. ## Examples ``` Input: 19 Output: true Input: 110 Output: false ```