Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ExchangeVariableValues
- {
- class MainClass
- {
- public static void Main(string[] args)
- {
- var a = int.Parse(Console.ReadLine());
- var b = int.Parse(Console.ReadLine());
- Console.WriteLine("Before:");
- Console.WriteLine($"a = {a}");
- Console.WriteLine($"b = {b}");
- var c = a;
- a = b;
- Console.WriteLine("After:");
- Console.WriteLine($"a = {a}");
- Console.WriteLine($"b = {c}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment