Advertisement
SaNik74

Basic of programming. Lesson#5. Rearrangement

Feb 14th, 2023
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.35 KB | None | 0 0
  1. internal class Program
  2. {
  3.     static void Main(string[] args)
  4.     {
  5.         string name = "Tyson";
  6.         string surname = "Mike";
  7.         string? tempName;
  8.  
  9.         Console.WriteLine(name + " " + surname);
  10.  
  11.         tempName = surname;
  12.         surname = name;
  13.         name = tempName;
  14.  
  15.         Console.WriteLine(name + " " + surname);
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement