Kotlinlearncs.online LogoJava
Return to List

Solve: Blue Ticket

Imported By: Geoffrey Challen
/ Version: 2021.6.0

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.

int blueTicket(int a, int b, int c) {
return 0; // You may need to remove this starter code
}

Related Lessons

Stuck? You may find these lessons helpful: