Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CodingBat-Logic1-blueTicket #264

Open
divinedragon opened this issue Jun 30, 2017 · 0 comments
Open

CodingBat-Logic1-blueTicket #264

divinedragon opened this issue Jun 30, 2017 · 0 comments

Comments

@divinedragon
Copy link
Owner

Write code and JUnit test cases for CodingBat-Logic1-blueTicket

Url - http://codingbat.com/prob/p192267

Problem Statement:

You have a blue lottery ticket, with ints a, b, and c on it. This makes three pairs, which we'll call ab, bc, and ac. Consider the sum of the numbers in each pair. If any pair sums to exactly 10, the result is 10. Otherwise if the ab sum is exactly 10 more than either bc or ac sums, the result is 5. Otherwise the result is 0.

blueTicket(9, 1, 0) → 10
blueTicket(9, 2, 0) → 0
blueTicket(6, 1, 4) → 10

Expected method declaration

public int blueTicket(int a, int b, int c) {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant