C++ Programs & Stuffz

Nothing like anything!!!

Please Click on ADS!!

Please Click on the above ads given by GOOGLE , so that I can maintain my blog!!

Tuesday, August 31, 2010

Interchange the values of two variables with the help of a third variable

//pgm to interchange the values of two variables with the help of a third variable
#include<iostream.h>
#include<conio.h>
void main()
{
    int a,b,c;
    clrscr();
    a=10;
    b=20;
    c=a;
    a=b;
    b=c;
    cout<<"a="<<a<<endl;
    cout<<"b="<<b;
    getch();
}

0 comments:

Post a Comment

free counters