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

 

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

grayScaleSimple() -- given three ints representing red, green and blue (in that order), return the average of the three ints that would be used to make the image grayscale.


grayScaleSimple(1, 1, 1) → 1.0
grayScaleSimple(10, 20, 30) → 20.0
grayScaleSimple(0, 0, 210) → 70.0

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

public double grayScaleSimple(int r, int g, 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: 100 Post-solution available

Copyright Nick Parlante 2017 - privacy