#include<stdio.h>
#include<conio.h>
main()
{
int a=8, b=12;
clrscr();
printf("Before swap of two numbers a=%d b=%d\n",a,b);
a=a+b;
b=a-b;
a=a-b;
printf("After swap of numbers a=%d b=%d",a,b);
getch();
}
#include<conio.h>
main()
{
int a=8, b=12;
clrscr();
printf("Before swap of two numbers a=%d b=%d\n",a,b);
a=a+b;
b=a-b;
a=a-b;
printf("After swap of numbers a=%d b=%d",a,b);
getch();
}
No comments:
Post a Comment