7./*Write
a program to Exchange to value without
use third variable*/
#include<stdio.h>
#include<conio.h>
main()
{
int a,b;
clrscr();
printf("\n ENTER VALUE
A:-");
scanf("%d",&a);
printf("\n ENTER VALUE
B:-");
scanf("%d",&b);
a=a+b;
b=a-b;
a=a-b;
printf("\n
a=%d,b=%d",a,b);
getch();
}
OUTPUT
ENTER VALUE
A:10
ENTER VALUE
B:15
A=15,B=10
No comments:
Post a Comment