JS You are writing a number guessing program where the player must try to guess the secret number 17. This function will take a player's guess and tell them if they are either right or whether they should guess higher or lower on their next turn Write a function named "higher_lower" that takes an int as a parameter and returns "higher" if 17 is greater than the input and "lower" if 17 is less than the input, and "correct" if 17 is equal to the input.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section6.1: Function And Parameter Declarations
Problem 3E
icon
Related questions
Question
JS
You are writing a number guessing program where the player must try to guess the secret number 17. This function will
take a player's guess and tell them if they are either right or whether they should guess higher or lower on their next turn
Write a function named "higher_lower" that takes an int as a parameter and returns "higher" if 17 is greater than the input
and "lower" if 17 is less than the input, and "correct" if 17 is equal to the input.
Transcribed Image Text:JS You are writing a number guessing program where the player must try to guess the secret number 17. This function will take a player's guess and tell them if they are either right or whether they should guess higher or lower on their next turn Write a function named "higher_lower" that takes an int as a parameter and returns "higher" if 17 is greater than the input and "lower" if 17 is less than the input, and "correct" if 17 is equal to the input.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr