eolymp

Розв`язок мовою C#

Приклад програми з використанням файлів для введення/виведення

using System;
using System.IO;

public class Sum
{
  private static void Main()
  {
      StreamReader streamReader = new StreamReader("input.txt");
   int ab = Convert.ToInt32(streamReader.ReadLine());
 
      int b  = ab %10;
      int a  = ab/10;
     
      StreamWriter sw = new StreamWriter("output.txt");
      sw.WriteLine(a+" "+b);
      sw.Close();
     
  }
}

Приклад програми з використанням консолі для введення/виведення

using System;

public class Sum
{
  private static void Main()
  {
   int ab = Convert.ToInt32(Console.ReadLine());
      int b  = ab %10;
      int a  = ab/10;
      Console.WriteLine(a+" "+b);
  }
}