Advertisement
Montagne94

5. Перестановка местами значений

Jan 7th, 2025
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 KB | Source Code | 0 0
  1. using System;
  2.  
  3. namespace HomeWork
  4. {
  5.     internal class Program
  6.     {
  7.         public static void Main(string[] args)
  8.         {
  9.             string userName = "12345678";
  10.             string password = "ProGamer";
  11.            
  12.             Console.WriteLine($"До перестановки: NickName = {userName}, Password = {password}");
  13.  
  14.             string temp = userName;
  15.             userName = password;
  16.             password = temp;
  17.             Console.WriteLine($"После перестановки: NickName = {userName}, Password = {password}");
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement