1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #include<stdio.h>
void main()
{
int a,b;
printf ("Enter the value of A:- ");
scanf ("%d",&a);
printf ("Enter the value of B:- ");
scanf ("%d",&b);
printf("%d is A and %d is B\n",a,b);
a=a+b;
b=a-b;
a=a-b;
printf("%d is A and %d is B\n",a,b);
}
|
Let 4(a) 6(b)
4(a) + 6(b) = 10(a New)
10(a New) - 6(b) = 4(b New)
10(a New) - 4(b New) = 6(a New)
I expect you understand the code above.
0 comments:
Post a Comment