{
int x, y;
clrscr();
printf("Enter two positive numbers");
scanf("%d%d",&x,&y);
y=y+x;
x=y-x;
y=y-x;
printf("The swapped numbers are %d and %d",x,y);
getch();
/* Comments: Let x=3 and y=4;
so y=x+y will give y= 3+4 y=7 x=3
x=y-x will give x = 7-3 x=4 y=7
Finally y=y-x will give y= 7-4 y=3 x=4
*/
}

I will go with my method because it has less no. of statements

That's a poor reason not to use his code. If you post the exact assignment I'm willing to wager that your instructor wants you to swap the variables in memory, not just on the console screen.

This is a program that ask input from the user about the characteristics of a gemstone then prints to the screen. Things like color, price and name. I have written ...