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.

  1. Make conditions on a string variable named mood.
  2. If the value of mood is Good, write I am glad you are in such a good mood today! on the console.
  3. If the value of mood is Ok, write It's Ok to be in an Ok mood! on the console.
  4. If the value of mood is Bad, write That is a bummer, take a break and cheer up! on the console.
  5. If the value of mood is anything else, write I couldn't figure out what mood you are in! on the console.

Get hands-on with 1200+ tech skills courses.