Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Gos
- {
- class Program
- {
- static void Main(string[] args)
- {
- var firstFileText = File.ReadAllLines("first.txt");
- var secondFileText = File.ReadAllLines("second.txt");
- using (var sw = new StreamWriter("first.txt", false))
- {
- for (int i = 0; i < firstFileText.Length; i++)
- {
- var line = i + firstFileText[i];
- if (secondFileText.Length > i)
- line += secondFileText[i];
- sw.WriteLine(line);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement