Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.IO;
- namespace LineNumbers
- {
- class Program
- {
- static void Main(string[] args)
- {
- using (var reader = new StreamReader("input.txt"))
- {
- using(var writer = new StreamWriter("output.txt"))
- {
- int lineNumbers = 1;
- while (!reader.EndOfStream)
- {
- var line = reader.ReadLine();
- writer.WriteLine($"{lineNumbers}. {line}");
- lineNumbers++;
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement