/* detect if two integers have opposite signs */
#include <stdio.h>

int x , y;
typedef int bool;
bool f;

int sdetect(x , y)
{

f = ((x ^ y) < 0);

if ( f == 1 ) {
printf("They have opposite signs\n");
}
else
{
printf("They have same signs\n");
}

}
Copyright © 2009,  2010,  2011,  2012,  2013, 2014     BeautifulWork Project    e-mail:  ahiliation@yahoo.co.in
BeautifulWork Project comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.