about | help | code help+videos | done | prefs |
HPCW2020_05_HordaksBoss
Hordak's Boss Problem 05 Worth 2 points Julia is working on an encryption algorithm which uses the factors of prime numbers for the basis of its one-way hashing. The first step she needs to solve for her algorithm is determining if her random number generator (RNG) is sending prime numbers or not. So she needs to code a prime number tester. Read in a single integer from the "RNG", then test the number to determine if it is Prime or not. A Prime number is only evenly divisible by the number 1, and itself. Print # is PRIME if the number being tested is Prime. Else, print # is NOT Prime Where # is the number being tested. HPCW2020_05_HordaksBoss(1) → "1 is NOT PRIME" HPCW2020_05_HordaksBoss(2) → "2 is PRIME" HPCW2020_05_HordaksBoss(3) → "3 is PRIME" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy