Link Search Menu Expand Document

Lesson 2 - Conditions (Practice)

Objectives

  1. Learn how to read and parse user input:

    string input = Console.ReadLine();
    int number = int.Parse(input);
    
  2. Write a car tax calculator

  3. Binary arithmetic - Socratic Method

  4. Some fun with binary arithmetic. What’s the output of the statement below?

    Console.WriteLine(0.1 + 0.2 == 0.3);
    

    WAT

    Explanation: StackOverflow

    *** Side Quest: Read about how double and decimal types are stored in binary: Binary floating point and .NET and Decimal floating point in .NET

Home Assignments

  1. 401k Calculator

  2. Income Tax Calculator

  3. * Days in a Month