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

 

jebbert@volusia.k12.fl.us > quiz2021_11_16_HL_GCF
prev  |  next  |  chance

Write a method that returns the greatest common factor of 'num1' and 'num2'. You are not allowed to use ANY methods from the Math library or from any other libraries. Look at the test data for examples.


quiz2021_11_16_HL_GCF(16, 32) → 16
quiz2021_11_16_HL_GCF(87, 71) → 1
quiz2021_11_16_HL_GCF(2, 3) → 1

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

public int quiz2021_11_16_HL_GCF(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: 270

Copyright Nick Parlante 2017 - privacy