distributed-computing/tasks/savitskiy-al/lab_2/worker-2/Program.cs
2023-12-07 00:34:42 +04:00

16 lines
419 B
C#

using System;
using System.IO;
using System.Linq;
string[] lines = File.ReadAllLines("/var/data/data.txt");
int umnoz = Convert.ToInt32(lines.First()) * Convert.ToInt32(lines.Last());
using (StreamWriter writer = new StreamWriter("/var/result/result.txt"))
{
writer.WriteLine(umnoz);
}
Console.WriteLine("Произведение успешно записано в файл! Результат: " + umnoz);