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

 

abraskin@mbusd.org 2016_student_creations_01 > multiples
prev  |  next  |  chance

If the string's length is a multiple of 3, return the last three characters of the string as a new string. If the string's length is a multiple of 2, return the last two characters of the string as a new string. If the string's length is multiple of both 2 and 3, return "I don't know". If it is not multiple of 2 or 3, return "I know".


multiples("abcdef") → "I don't know"
multiples("ab") → "ab"
multiples("123456") → "I don't know"

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

String multiples(String str) { }

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

Copyright Nick Parlante 2017 - privacy