Lesson 2 - Conditions (Practice)
Objectives
-
Learn how to read and parse user input:
string input = Console.ReadLine(); int number = int.Parse(input); -
Write a car tax calculator
-
Binary arithmetic - Socratic Method
-
Some fun with binary arithmetic. What’s the output of the statement below?
Console.WriteLine(0.1 + 0.2 == 0.3);
Explanation: StackOverflow
*** Side Quest: Read about how
doubleanddecimaltypes are stored in binary: Binary floating point and .NET and Decimal floating point in .NET