16 lines
419 B
C#
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);
|
|
|