#include<stdbool.h>
#include<stdio.h>
void toboolean(int x1)
{
while(x1>0)
{
x1=x1/2;
}
}
bool oppositeSigns(int x, int y)
{
//toboolean(x^y);
//toboolean(x);
toboolean(y);
return ((x ^ y) < 0);
}
int main()
{
int x = 10, y = -10;
if (oppositeSigns(x, y) == true)
printf ("Signs are opposite"); else
printf ("Signs are not opposite"); return 0;
}
I2luY2x1ZGU8c3RkYm9vbC5oPgojaW5jbHVkZTxzdGRpby5oPgoKdm9pZCB0b2Jvb2xlYW4oaW50IHgxKQp7CiAgICB3aGlsZSh4MT4wKQogICAgewogICAgICAgIHByaW50ZigiJWQiLHgxJTIpOwogICAgICAgIHgxPXgxLzI7CiAgICB9CiAgICBwcmludGYoIlxuIik7Cn0KYm9vbCBvcHBvc2l0ZVNpZ25zKGludCB4LCBpbnQgeSkKewogICAgLy90b2Jvb2xlYW4oeF55KTsKICAgIC8vdG9ib29sZWFuKHgpOwogICAgdG9ib29sZWFuKHkpOwoJcmV0dXJuICgoeCBeIHkpIDwgMCk7Cn0KCmludCBtYWluKCkKewoJaW50IHggPSAxMCwgeSA9IC0xMDsKCWlmIChvcHBvc2l0ZVNpZ25zKHgsIHkpID09IHRydWUpCglwcmludGYgKCJTaWducyBhcmUgb3Bwb3NpdGUiKTsKCWVsc2UKCXByaW50ZiAoIlNpZ25zIGFyZSBub3Qgb3Bwb3NpdGUiKTsKCXJldHVybiAwOwp9Cg==