© Radek Vystavěl 2017

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

10. Economic Calculations

Radek Vystavěl

(1)Ondřjov, Czech Republic

In this chapter, you will learn how to count money. It’s pretty simple, but you need to use some common sense.

Currency Conversion

Performing simple economic calculations usually means doing currency conversions , which you will try in this section.


After accepting an amount in euros and the euro exchange rate, you will convert the amount to dollars (see Figure 10-1).

Figure 10-1 Converting to dollars


Here is the code:

static void Main(string[] args)

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.