Advertisement
rukvir

HW 1_5

Feb 2nd, 2025
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.84 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Globalization;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7.  
  8. namespace HW_2025
  9. {
  10.     internal class Program
  11.     {
  12.         static void Main(string[] args)
  13.         {
  14.             string firstValue = "Хонда"; //    | Вариант 2 Кофе
  15.             string secondValue = "Соитиро"; // | Вариант 2 Чай
  16.             string temp;
  17.  
  18.             Console.WriteLine($"Значения до изменений first = {firstValue}, second = {secondValue}");
  19.  
  20.             temp = firstValue;
  21.             firstValue = secondValue;
  22.             secondValue = temp;
  23.  
  24.             Console.WriteLine($"Значение после замены first = {firstValue}, second = {secondValue}");
  25.             Console.ReadKey();
  26.  
  27.         }
  28.     }
  29. }
  30.  
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement