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

 

andersoniii.edwin@cusd80.com > greatestCommonFactor
prev  |  next  |  chance

Greatest Common Factor GFC -- You remember--- the largest number that will divide into two numbers. The input parameters will be two integers and the returning value will be an integer also - the GCF. Example 20, 24 the GCF is 4 (remember a GCF may be ONE).


greatestCommonFactor(20, 24) → 4
greatestCommonFactor(24, 20) → 4
greatestCommonFactor(88, 24) → 8

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

public int greatestCommonFactor(int num1, int num2) { }

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

Copyright Nick Parlante 2017 - privacy