Exercises: Simple Conditions

Now let's practice the lessons learned in this chapter about of conditional statements if and if-else. We will solve a few practical exercises.

Empty Visual Studio Solution (Blank Solution)

At the start we create a Blank Solution in Visual Studio to organize better the task solutions from the exercise - each task will be in a separate project and all projects will be in a common solution.

We run Visual Studio and create a new Blank Solution: [File] -> [New] -> [Project].

Choose from the dialog box [Templates] -> [Other Project Types] -> [Visual Studio Solutions] -> [Blank Solution] and give an appropriate project name, for example: “Simple-Conditions”:

Now we have an empty Visual Studio Solution (no projects in it):

We shall use this solution to create a separate project for each of the problems, which we will solve as exercises in this chapter.

results matching ""

    No results matching ""