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

 

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

Write a method that returns the difference between the squares of two numbers, 'a' and 'b'. Look at the test data for examples. There are several ways to approach this problem. You ARE allowed to use methods from the Math class, but it is not required.


jan30_2020_APP1SLHL_diffOfSquares(3, 5) → 16
jan30_2020_APP1SLHL_diffOfSquares(100, 101) → 201
jan30_2020_APP1SLHL_diffOfSquares(80, 1) → 6399

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

public int jan30_2020_APP1SLHL_diffOfSquares(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: 290

Copyright Nick Parlante 2017 - privacy