© Radek Vystavěl 2017

Radek Vystavěl, C# Programming for Absolute Beginners, https://doi.org/10.1007/978-1-4842-3318-4_9

9. Numbers

Radek Vystavěl

(1)Ondřjov, Czech Republic

In previous chapter, you learned about input in general and numeric input in particular. You also did some simple calculations on numbers entered by the user. In this chapter, you will look at numbers in more detail. After all, a computer is called a computer because it computes frequently!

Decimal Input

You will start with the task of reading a decimal number from the user.

Task

You will write program that accepts a decimal number from the user and repeats it immediately on the screen (see Figure 9-1).

Figure 9-1 The final program

Solution

There are two differences between the ...

Get C# Programming for Absolute Beginners now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.