Review the solution

Completed

The following code is one possible solution for the challenge from the previous unit.

string name = "Bob";
int messages = 3;
decimal temperature = 34.4m;

Console.Write("Hello, ");
Console.Write(name);
Console.Write("! You have ");
Console.Write(messages);
Console.Write(" messages in your inbox. The temperature is ");
Console.Write(temperature);
Console.Write(" celsius.");

This code is just one possible solution of how to create the output. For example, it's possible you could have used more Console.Write() statements; however, you should have initialized three variables to store the three values per the instructions in the challenge.

Furthermore, you should have used:

  • a variable of type string to hold the name "Bob".
  • a variable of type int to store the number of messages.
  • a variable of type decimal, float, or double to store the temperature.

If you were successful, congratulations! Continue to the knowledge check in the next unit.

Important

If you had trouble completing this challenge, maybe you should review the previous units before you continue.