Created
February 6, 2025 14:14
-
-
Save KaslGame/7373a10bf58e0a7a37f4a64b171e2636 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Learn | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string name = "Хмара"; | |
string surname = "Данил"; | |
string bufferNameSurname; | |
Console.WriteLine($"Имя до измениния: {name}. Фамилия до изменения: {surname}"); | |
bufferNameSurname = name; | |
name = surname; | |
surname = bufferNameSurname; | |
Console.WriteLine($"Имя после измениния: {name}. Фамилия после изменения: {surname}"); | |
string cupsСoffee = "Чай"; | |
string cupsTea = "Кофе"; | |
string emptyCup; | |
Console.WriteLine($"\nВ чашках кофе: {cupsСoffee}. В чашках чая: {cupsTea}"); | |
emptyCup = cupsСoffee; | |
cupsСoffee = cupsTea; | |
cupsTea = emptyCup; | |
Console.WriteLine($"После изменения. В чашке кофе: {cupsСoffee}. В чашке чая: {cupsTea}"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment