Groundhogs at the party

Report a typo

Groundhogs like to throw fun parties, and at their parties, they like to munch on Reese's peanut butter cups. But not too much of it, or they will feel sick! A successful groundhog party should have between 10 and 20 Reese's peanut butter cups (inclusive) unless it is the weekend. In this case, they need 15 to 25 Reeses peanut butter cups (inclusive).

Write a Kotlin program that reads two values:

  • the first is the number of Reese's peanut butter cups;
  • the second is a boolean value that represents whether it is the weekend or not.

Output the boolean value that tells us whether the party is successful or not.

Sample Input 1:

5
true

Sample Output 1:

false

Sample Input 2:

16
false

Sample Output 2:

true
Write a program in Kotlin
fun main() {
// write your code here
}
___

Create a free account to access the full topic