Advertisement
Artem439

ДЗ: Перестановка местами значений 2

Mar 5th, 2025
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.63 KB | None | 0 0
  1. using System;
  2.  
  3. namespace IJuniorPractice
  4. {
  5.     internal class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string name = "Жир";
  10.             string surname = "Артём";
  11.             string changingPlaces;
  12.  
  13.             Console.WriteLine($"Ваше имя: {name} \nВаша фамилия: {surname}");
  14.             Console.WriteLine("Меняем местами...");
  15.  
  16.             changingPlaces = name;
  17.             name = surname;
  18.             surname = changingPlaces;
  19.  
  20.             Console.WriteLine($"Ваше имя: {name} \nВаша фамилия: {surname}");
  21.  
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement