#include<iostream.h> #include<conio.h> void swap(int,int) void main() { clrscr(); int a,b; cout<<"Enter two numbers a and b: "; cin>>a>>b; swap(a,b); cout<<"After swapping a and b are "<<a<<" and "<<b; getch(); } void swap(int a, int b) { int t; t=a; a=b; b=t; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)