Skip to content

Instantly share code, notes, and snippets.

@QRemark
Created January 8, 2024 17:30
Show Gist options
  • Save QRemark/472a1ab0128610e99be12f2bf9335840 to your computer and use it in GitHub Desktop.
Save QRemark/472a1ab0128610e99be12f2bf9335840 to your computer and use it in GitHub Desktop.
Перестановка местами значений
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
namespace homeWork1
{
internal class Program
{
static void Main(string[] args)
{
string firstName = "Fisher";
string lastName = "Bob";
string internalInaformation;
Console.WriteLine($"Изначальное имя: {firstName}.");
Console.WriteLine($"Изначальная фамилия: {lastName}.");
internalInaformation = lastName;
lastName = firstName;
firstName = internalInaformation;
Console.WriteLine();
Console.WriteLine($"Имя после изменения: {firstName}.");
Console.WriteLine($"Фамилия после изменения: {lastName}.");
Console.ReadKey();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment