#include <stdio.h>
#include <conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter value for a and b: ");
scanf("%d %d",&a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("\nAfter swapping a and b: %d %d",a,b);
getch();
}
#include <conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter value for a and b: ");
scanf("%d %d",&a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("\nAfter swapping a and b: %d %d",a,b);
getch();
}
No comments:
Post a Comment