Solution: Making Decisions
Let's discuss the solution to the exercise.
We'll cover the following
Problem
This exercise makes decisions based on your mood. Write code for a console application that meets the requirements listed below.
- Make conditions on a
string
variable namedmood
. - If the value of
mood
isGood
, writeI am glad you are in such a good mood today!
on the console. - If the value of
mood
isOk
, writeIt's Ok to be in an Ok mood!
on the console. - If the value of
mood
isBad
, writeThat is a bummer, take a break and cheer up!
on the console. - If the value of
mood
is anything else, writeI couldn't figure out what mood you are in!
on the console.
Get hands-on with 1400+ tech skills courses.