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

 

ted_mcleod@fuhsd.org java_practice_final_arrays > divExactly10And5
prev  |  next  |  chance

Given two positive integers, return true if exactly one of the numbers is divisible by 10 and the other number is divisible by 5; otherwise return false. Recall that n % m gives the remainder that you get when dividing n by m.

Hint: If both numbers are divisible by 10, that is not exactly one, so you should return false.

divExactly10And5(15, 30) → true
divExactly10And5(60, 50) → false
divExactly10And5(40, 31) → false

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

public boolean divExactly10And5(int a, int b) { }

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

Copyright Nick Parlante 2017 - privacy