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

 

sspiege3@schools.nyc.gov > sumSquares
prev  |  next  |  chance

Given a num, calculate the sum of the squares up to num*num if num = 4, you are to return the value of 1*1 + 2*2 + 3*3 + 4*4


sumSquares(1) → 1
sumSquares(2) → 5
sumSquares(3) → 14

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

public int sumSquares(int num) }

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

Copyright Nick Parlante 2017 - privacy