Advertisement
Gudini

Homework1_5

Sep 23rd, 2023
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.64 KB | Source Code | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Homework1_5
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             string name = "Гнатюк";
  14.             string surname = "Андрей";
  15.             string saveName;
  16.  
  17.             Console.WriteLine($"Перепутано имя: {name}, фамилия:{surname}");
  18.  
  19.             saveName = name;
  20.             name = surname;
  21.             surname = saveName;
  22.  
  23.             Console.WriteLine($"Исправлено имя: {name}, фамилия:{surname}");
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement