Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save smah-beep/d7bdd881a40b4cbbec7d29ea28c3e4df to your computer and use it in GitHub Desktop.

Select an option

Save smah-beep/d7bdd881a40b4cbbec7d29ea28c3e4df to your computer and use it in GitHub Desktop.
ДЗ: Перестановка местами значений
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _DZ_
{
internal class Program
{
static void Main(string[] args)
{
int ageDad = 10;
int ageSon = 42;
Console.WriteLine($"Возраст отца {ageDad}, возрат сына {ageSon}");
Console.WriteLine("Данные перепутаны, нужно поменять их местами");
int age = ageSon;
ageSon = ageDad;
ageDad = age;
Console.WriteLine($"Возраст отца {ageDad}, возрат сына {ageSon}");
Console.WriteLine("Другое дело!");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment