//Program to swap the two numbers by using third variable(Level - Low)


Program # 8: Swap two Numbers

//Program to swap the two numbers by using third variable(Level - Low)
#include <iostream.h> #include <conio.h>

void main ()
{
clrscr();
int a,b,c;        //Declare Integer variables 
a = 40;
b = 50;
c = a;
a = b; 
b = c;

cout<<"The value of a is = "<<a<<endl;              //End line cout<<"The value of b is = "<<b;

getch();
}

Post a Comment

0 Comments