If & Switch Statements (Exercise) – Learn C#

This is an exercise for this YouTube video.

Happy learning and good luck!

You want to compare two variables and based on the result of the comparison, you want to do something.

What statement(s) can you use?

 

Assignment: Write code which will determine the sign of  a number.

 

 

Click to see the answer

 

 

 

 

Assignment: Make a simple chatbot using switch statement.

 

 

Click to see the answer

 

 

 

 

Leave a comment


This site uses Akismet to reduce spam. Learn how your comment data is processed.


Winner

2 years ago

Hi am a fan of your work.I’ll probably be visiting this website like everyday.
Please could you make a tutorial about arrays.
And I will also recommend putting a few ads to help your business.

Matej Rešetár

2 years ago

Hello! I’m happy that you enjoy my videos!
Tutorial about arrays is coming up next in the Learn C# course.
Thanks for the recommendation, but I’m not planning to use this website as a income stream (at least not yet), so I think the “huge” amounts of YouTube money I get is enough 😀

Development made simple

Your success is our success. If you have any questions, let us know.

Copyright 2017 - 2018 Reso Coder © All Rights Reserved