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

 

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

Create a method that, when given a start location and finish location, can tell whether or not the they are within four steps of each other.
Examples:
(1, 1) (2, 2): "yes"
(0, 0) (5, 0): "no"
(0, 0) (4, 4): "no"


distanceCheck(0, 0, 0, 0) → "yes"
distanceCheck(5, 4, 5, 4) → "yes"
distanceCheck(0, 4, 0, 4) → "no"

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

public String distanceCheck(int x1, int x2, int y1, int y2) }

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