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

 

siochi@cnu.edu > isOnLine
prev  |  next  |  chance

Given the slope of a line and its y-intercept, determine if a point represented by the coordinates x, y is on the line or not. The equation of a line is y = mx + b, where m is the slope and b is the y-intercept.


isOnLine(1.0, 1.0, 1.0, 2.0) → true
isOnLine(1.0, 0.0, 1.0, 1.0) → true
isOnLine(1.0, 0.0, 1.0, 2.0) → false

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

public boolean isOnLine(double m, double b, double x, double y) { }

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: 150

Copyright Nick Parlante 2017 - privacy