that interchanges X and Y using only 2 variables and using 3 mathematical statements
How do write a turbo C program...?
x=x+y
y=x-y
x=x-y
Reply:main()
{
int a,x,y;
a=x;
x=y;
y=a;
}
thank u.
Reply:#include%26lt;conio.h%26gt;
#include%26lt;stdio.h%26gt;
main()
{
int x,y ;
printf("Enter 2 nos.");
scanf( "%d %d",%26amp;x,%26amp;y);
x=x+y;
y=x-y;
x=x-y ;
printf("x= %d, y=%d",x,y);
getch();
}
wallflower
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment