hey buddy,

I got the right output. I donno y u didnt get the rt o/p. this is my program.

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("enter a,b:");
scanf("%d%d",&a,&b);
a=1?a-(b=1?((a=1?a+b:0)-b):0):0;
printf("a=%d b=%d",a,b);
getch();
}

i tried with diff values and i got the desired o/p i mean swapped o/p.