id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

hasFiveFactors


Create a method called public boolean hasFiveFactors (int x) that will return true if the number has exactly 5 factors and false otherwise. So hasFiveFactors(16) would return true - because(1,2,4,8,16) {x will always be positive and we are looking for the positive factors}


hasFiveFactors(16) → true
hasFiveFactors(12) → false
hasFiveFactors(32) → false

...Save, Compile, Run (ctrl-enter)

public boolean hasFiveFactors(int x){ }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Copyright Nick Parlante 2017 - privacy