14 lines
444 B
C#
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); |