Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Swap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,18 @@ int main()


}

#using third variable

#include<iostream>
using namespace sstd;
int maain()
{
int a = 10, b=20,temp;
cout<<"before swapping: "<<"value of a is: "<<a<<"value of b is: "<<b<<endl;

temp=a;
a=b;
b=temp;

cout<<"after swapping: "<<the value of a is : <<a<<"value of b is : <<endl;