A Simple Interactive Program
Explore how to write an interactive C# program that takes user input from the command line and displays it using formatted strings. Understand the use of Console.WriteLine for output formatting and program structure basics including statements, blocks, and scope.
We'll cover the following...
We'll cover the following...
Accepting Command-Line Input
In the example, in the previous lesson you simply ran the program and it produced an output. However, many programs are written to accept command-line input.
Down below is an example of a more interactive sample program which takes input using the command line.
In this example, you’ll be required to enter your name which will then be displayed when you run the code.
Note: Before ...