Advertisement
nahidjamalli

Lesson #6

Mar 20th, 2020
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.71 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace Program
  6. {
  7.     class Program
  8.     {
  9.         static void Main(string[] args)
  10.         {
  11.             int num1, num2, temp;
  12.             Console.Write("\nEnter the First Number : ");
  13.             num1 = int.Parse(Console.ReadLine());
  14.             Console.Write("\nEnter the Second Number : ");
  15.             num2 = int.Parse(Console.ReadLine());
  16.             temp = num1;
  17.             num1 = num2;
  18.             num2 = temp;
  19.             Console.Write("\nAfter Swapping : ");
  20.             Console.Write("\nFirst Number : "+num1);
  21.             Console.Write("\nSecond Number : "+num2);
  22.             Console.Read();
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement