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

 

countFactors


Given an positive integer num , determine how many factors the integer has. For example countFactors(10) would return 4 because 10 is divisible by 1, 2, 5, 10


countFactors(10) → 4
countFactors(2) → 2
countFactors(16) → 5

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

public int countFactors(int number) { }

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

Difficulty: 200

Copyright Nick Parlante 2017 - privacy