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

 

dsawyer@methacton.org intro_p4_level_3 > coprime
prev  |  next  |  chance

Given two positive integers, return true if they are co-prime. This means that the only common factor they have is one. Otherwise return false.


coprime(4, 9) → true
coprime(5, 25) → false
coprime(77, 6) → true

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

public boolean coprime( 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

Difficulty: 200 Post-solution available

Copyright Nick Parlante 2017 - privacy