Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 2. Branching and Operators: The Math Game

Chapter 2. Branching and Operators: The Math Game

Now that you know how to set up a basic C# program, you are ready to manipulate information in a more interesting way. In this chapter, you will learn several ways computers deal with information. You will also learn how to have computers appear to make decisions and how to generate random numbers, which are useful in a surprising number of situations. After reading this chapter, you will be able to:

  • Understand numeric data types.

  • Convert variables from one type to another.

  • Use if and switch statements to control branching behavior.

  • Create a random number.

  • Understand basic math and assignment operators.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint