/Syntax-and-Syntax-Sugar-Exercise

.NET 6.0 template project for the Syntax and Syntax Sugar exercise at TrueCoders

Primary LanguageC#

Exercise 1:

Given the following code, change the code to implement:

  • inferred typing
  • string interpolation
  • and the ternary operator
int answer = 4;
string response;
if (answer < 9) 
{
    response = answer + " is less than nine";
}
else
{
    response = answer + " is greater than or equal to nine";
}