You are on page 1of 1

#include<iostream.h> #inckude<conio.

h> void swap(int ix,int iy); void main() { clrscr(); int ix,iy; cout<<"Enter 2 integers :"; cin>>ix>>iy; cout<<"\n Integers :"; cout<<\nix="<<ix<<"\niy="<<iy; swap(ix,iy); cout<<"\n after swapping :"; cout<<"\nix="<<ix<<"\niy="<<iy; getch(); } void swap(int &a, int &b) { int temp; temp=a; a=b; b=temp; }

You might also like