Home > Articles > Programming > C#

Introduction to C# Apps

Paul Deitel and Harvey M. Deitel introduce console apps, which input and output text in a console window. In this chapter you'll learn to input data from the keyboard and output data to the screen, declare and use data of various types, use arithmetic operators, write decision-making statements and use relational and equality operators.
This chapter is from the book ๏”€

3.1. Introduction

We now introduce C# app programming. Most of the C# apps youโ€™ll study in this book process information and display results. In this chapter, we introduce console appsโ€”these input and output text in a console window, which in Windows is known as the Command Prompt.

We begin with several examples that simply display messages on the screen. We then demonstrate an app that obtains two numbers from a user, calculates their sum and displays the result. Youโ€™ll perform various arithmetic calculations and save the results for later use. Many apps contain logic that makes decisionsโ€”the last example in this chapter demonstrates decision-making fundamentals by comparing numbers and then displaying messages based on the comparison results. For example, the app displays a message indicating that two numbers are equal only if they have the same value.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.