Console I/O

Learn to write to console and read from console.

Console output

We’ve already worked with console input and output and written several statements that print to the console. This lesson provides several exercises for us to consolidate this knowledge.

There are essentially two methods that are most important if we need to output to the console:

  • The Console.Write() method prints to the console and keeps the cursor on the same line.
  • The Console.WriteLine() method prints to the console and moves the cursor to the next line.

To understand this difference more clearly, let’s consult the following code snippets:

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy