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

 

jebbert@volusia.k12.fl.us > biggestPrimeFactors
prev  |  next  |  chance

Write a method that returns an array with the two largest prime factors of the positive input parameter. If the input parameter is prime, return an array with 1 and itself. Always return the factors in non-decreasing order.


biggestPrimeFactors(5) → [1, 5]
biggestPrimeFactors(28) → [2, 7]
biggestPrimeFactors(100) → [5, 5]

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

public int[] biggestPrimeFactors(int num) { }

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: 440

Copyright Nick Parlante 2017 - privacy