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

 

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

grayScale() -- given three ints representing red, green and blue (in that order), return the average of the three ints taking into account the greater sensitivity of the human visual system to green. Assume that humans are twice as sensitive to green as they are to either red or blue.


grayScale(10, 5, 10) → 7.5
grayScale(100, 50, 100) → 75.0
grayScale(100, 100, 100) → 100.0

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

public double grayScale(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