Home » 2015 » December » 30 » Program to interchange the values of two variables
1:06 AM
Program to interchange the values of two variables

Programs in C++

Program to interchange the values of two variables

 

 

 

#include <iostream.h>

#include <conio.h>

Void swap(int,int);

Void main()

{

clrscr();
int a=10,b=5;

swap(a,b);

cout<<”a =  “<<a<<” b= “ <<b;

}

Void swap(int x,int y)

{

Int t;

t=x;

x=y;

y=t;

}

Views: 778 | Added by: discovery | Tags: computer, C++ | Rating: 0.0/0
Total comments: 0
avatar
uCoz