© Radek Vystavěl 2017

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

18. Multiple Conditions

Radek Vystavěl

(1)Ondřjov, Czech Republic

Staying with the topic of conditions, you will now proceed to more complex examples. In this chapter, you will meet tasks that can be solved using several conditions in a single program.

Soccer

First, you will consider in detail a typical situation of three branches of alternative execution paths.

Task

You will prepare a program in which the user enters data about a soccer match: the numbers of goals scored by both sides. The program then evaluates the match result. It displays whether the first club won , the second club won, or it was a tie (see Figures 18-1, ...

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.