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

 

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

Return 'true' if all the numbers listed in 'factors' are factors of 'num'. Return false if ANY of the numbers listed in 'factors' are NOT factors of 'num'. Preconditions: 'num'>0. All numbers in 'factors' are greater than 1 and less than 'num'.


quiz2023_05_31_APP1SL_factorsAll(44, [2, 4, 11]) → true
quiz2023_05_31_APP1SL_factorsAll(44, [2, 4, 22]) → true
quiz2023_05_31_APP1SL_factorsAll(44, [2, 4, 11, 22]) → true

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

public boolean quiz2023_05_31_APP1SL_factorsAll(int num, int[] factors) { }

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

Copyright Nick Parlante 2017 - privacy