© Radek Vystavěl 2017

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

8. Input

Radek Vystavěl

(1)Ondřjov, Czech Republic

Up to now, all of your programs have been manipulating data (numbers, text, and so on) that was either fixed directly in source code or drawn from the operating system (dates, random numbers, and so on). Typically, programs get their data from the user, which is what you will learn about in this chapter.

Text Input

You will start your study of input with the simplest possible case.

Task

You will write a program that accepts a single line of text from the user and immediately repeats the inputted text to the output (see Figure 8-1).

Figure 8-1 The completed program

Solution

Here ...

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.