write a program in c++ to interchange 2 values without the 3rd variable.
Answers
Answered by
1
#include <stdio.h>
int main()
{
printf("Hello world!\n");
int a,b;
printf("Enter the two number \n");
scanf("%d%d",&a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("%d%d",a,b);
return 0;
}
Similar questions