
{"id":15909,"date":"2014-07-25T17:14:34","date_gmt":"2014-07-25T17:14:34","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=15909"},"modified":"2014-07-25T17:14:34","modified_gmt":"2014-07-25T17:14:34","slug":"how-to-write-an-algorithm-to-detect-if-two-integers-have-opposite-signs","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2014\/07\/25\/how-to-write-an-algorithm-to-detect-if-two-integers-have-opposite-signs\/","title":{"rendered":"How to write an algorithm to detect if two integers have opposite signs ?"},"content":{"rendered":"<pre>\n\/* detect if two integers have opposite signs *\/\n#include &lt;stdio.h&gt;\n\nint x , y;\ntypedef int bool;\nbool f;\n\nint sdetect(x , y)\n{\n\nf = ((x ^ y) &lt; 0);\n\nif ( f == 1 ) {\nprintf(\"They have opposite signs\\n\");\n}\nelse\n{\nprintf(\"They have same signs\\n\");\n}\n\n}\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\/* detect if two integers have opposite signs *\/ #include &lt;stdio.h&gt; int x , y; typedef int bool; bool f; int sdetect(x , y) { f = ((x ^ y) &lt; 0); if ( f == 1 ) { printf(&#8220;They have opposite signs\\n&#8221;); } else { printf(&#8220;They have same signs\\n&#8221;); } }<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[141,21,91],"tags":[386],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/15909"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=15909"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/15909\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=15909"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=15909"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=15909"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}