about | help | code help+videos | done | prefs |
Write a method named smallestFactor that accepts a positive number and returns the smallest factor of the number other than 1. If the number is prime, the method returns 1. smallestFactor(457) → 1 smallestFactor(1) → 1 smallestFactor(34555) → 5 ...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: 200
Copyright Nick Parlante 2017 - privacy