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

 

allHaveAGroup


Define a function that when passed two integers, the first representing the total number of students in a class, and the second representing the size of groups required by the professor for a group assignment. Return true if the class can be split in the given group size without any student(s) left without a group, false otherwise.


allHaveAGroup(1000, 50) → true
allHaveAGroup(80, 20) → true
allHaveAGroup(80, 30) → false

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

boolean allHaveAGroup(int classSize, int groupSize) { }

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: 2 Post-solution available

Copyright Nick Parlante 2017 - privacy