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

 

mmiller@cacegypt.org cigol-1 > sheffim
prev  |  next  |  chance

Sheffim are always found in trios, identified by ints a, b, and c. The likelyhood they will attack is a number from 0 to 20. If the id numbers are all different from each other, return a 0. If all of the numbers are the same, return 20. If only two of the numbers are the same, return a 10.


sheffim(1, 2, 3) → 0
sheffim(2, 2, 2) → 20
sheffim(1, 1, 2) → 10

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

public int sheffim(int a, int b, int c) { }

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

Copyright Nick Parlante 2017 - privacy