C++20 sections · 1024 units
Open in Course

Challenge: Is Positive

Boolean return type

Functions can return true/false values! Your task: Write a function called isPositive that returns true if a number is greater than 0. Read a number and print Yes if it's positive, No otherwise.