distributed-computing/tasks/ostrovskaya-sf/lab_2/worker-2/Program.cs
Софья Островская 685fd6ab9b fix
2023-10-17 10:35:30 +04:00

14 lines
444 B
C#

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