
{"id":15948,"date":"2014-09-16T13:36:12","date_gmt":"2014-09-16T13:36:12","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=15948"},"modified":"2014-09-16T13:36:12","modified_gmt":"2014-09-16T13:36:12","slug":"hacking-with-integer-divisibility","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2014\/09\/16\/hacking-with-integer-divisibility\/","title":{"rendered":"Hacking with integer divisibility"},"content":{"rendered":"<pre>\n\/* work copied from http:\/\/www.sanfoundry.com\/c-program-number-divisible-by-5\/ *\/\n#include &lt;stdio.h&gt;\n\nnumberdivi()\n{\n\nint i, num1, num2, count = 0, sum = 0;\nprintf(\"Enter the value of num1 and num2 : \");\nscanf(\"%d %d\",&amp;num1,&amp;num2);\nfor (i = num1; i &lt; num2 ; i++)\n{\nif ((i % 5) == 0)\n{\nprintf(\"%3d,\",i);\ncount++;\nsum = sum + i;\n}\n}\nprintf(\"\\n Number of integers divisible by 5 between %d and %d = %d \\n\",num1,num2,count);\nprintf(\"The sum of all integers that are divisible by 5 = %d\\n\",sum);\n}\n\/* http:\/\/en.wikipedia.org\/wiki\/Divisibility_rule *\/\n\/* http:\/\/stackoverflow.com\/questions\/18473730\/algorithm-in-hardware-to-find-out-if-number-is-divisible-by-five *\/\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\/* work copied from http:\/\/www.sanfoundry.com\/c-program-number-divisible-by-5\/ *\/ #include &lt;stdio.h&gt; numberdivi() { int i, num1, num2, count = 0, sum = 0; printf(&#8220;Enter the value of num1 and num2 : &#8220;); scanf(&#8220;%d %d&#8221;,&amp;num1,&amp;num2); for (i = num1; i &lt; num2 ; i++) { if ((i % 5) == 0) { printf(&#8220;%3d,&#8221;,i); count++; sum = sum + i; &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2014\/09\/16\/hacking-with-integer-divisibility\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Hacking with integer divisibility&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[141,78,91],"tags":[673],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/15948"}],"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=15948"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/15948\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=15948"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=15948"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=15948"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}