Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace ExchangeVariableValues
- {
- class ExchangeVariableValues
- {
- static void Main()
- {
- int a = 5;
- int b = 10;
- a = a + b;
- b = a - b;
- a = a - b;
- Console.WriteLine("Values before: a = 5 \n b = 10");
- Console.WriteLine("Values after: a = {0}\n b = {1}", a, b);
- }
- }
- }
- // Console Output:
- // Values before: a = 5
- // b = 10
- // Values after: a = 10
- // b = 5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement