<divclass="center"><iframescrolling="no"frameborder="0"src="../../d4/d89/problem__23_2sol1_8c__incl.svg"width="243"height="127"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
<trclass="memitem:a1aca7f530f82b27100262adba9e7556b"><tdclass="memItemLeft"align="right"valign="top">char </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="../../d7/ddb/problem__23_2sol1_8c.html#a1aca7f530f82b27100262adba9e7556b">get_perfect_number</a> (unsigned long <aclass="el"href="../../db/d01/problem__13_2sol1_8c.html#a0240ac851181b84ac374872dc5434ee4">N</a>)</td></tr>
<trclass="memitem:a4f128410e6582fe26488e2316cc96e17"><tdclass="memItemLeft"align="right"valign="top">unsigned long </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="../../d7/ddb/problem__23_2sol1_8c.html#a4f128410e6582fe26488e2316cc96e17">is_abundant</a> (unsigned long <aclass="el"href="../../db/d01/problem__13_2sol1_8c.html#a0240ac851181b84ac374872dc5434ee4">N</a>)</td></tr>
<trclass="memitem:ac5d600bf3077f4188afc4c5cd2c40eaf"><tdclass="memItemLeft"align="right"valign="top">unsigned long </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="../../d7/ddb/problem__23_2sol1_8c.html#ac5d600bf3077f4188afc4c5cd2c40eaf">get_next_abundant</a> (unsigned long <aclass="el"href="../../db/d01/problem__13_2sol1_8c.html#a0240ac851181b84ac374872dc5434ee4">N</a>)</td></tr>
<trclass="memitem:a3ab61b5a1c4f2288625d160aa0ea8478"><tdclass="memItemLeft"align="right"valign="top">char </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="../../d7/ddb/problem__23_2sol1_8c.html#a3ab61b5a1c4f2288625d160aa0ea8478">is_sum_of_abundant</a> (unsigned long <aclass="el"href="../../db/d01/problem__13_2sol1_8c.html#a0240ac851181b84ac374872dc5434ee4">N</a>)</td></tr>
<divclass="center"><iframescrolling="no"frameborder="0"src="../../d7/ddb/problem__23_2sol1_8c_ac5d600bf3077f4188afc4c5cd2c40eaf_cgraph.svg"width="468"height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
<divclass="line"><aname="l00023"></a><spanclass="lineno"> 23</span> <spanclass="keywordtype">unsigned</span><spanclass="keywordtype">long</span> sum = 1;</div>
<divclass="line"><aname="l00024"></a><spanclass="lineno"> 24</span> <spanclass="keywordtype">char</span> ret = 0;</div>
<divclass="line"><aname="l00026"></a><spanclass="lineno"> 26</span> <spanclass="keywordflow">for</span> (<spanclass="keywordtype">unsigned</span><spanclass="keywordtype">long</span> i = 2; i * i <= <aclass="code"href="../../db/d01/problem__13_2sol1_8c.html#a0240ac851181b84ac374872dc5434ee4">N</a>; i++)</div>
<divclass="center"><iframescrolling="no"frameborder="0"src="../../d7/ddb/problem__23_2sol1_8c_a4f128410e6582fe26488e2316cc96e17_cgraph.svg"width="288"height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
<divclass="line"><aname="l00072"></a><spanclass="lineno"> 72</span> <spanclass="comment"> * i + j = N where both i and j should be abundant</span></div>
<divclass="line"><aname="l00073"></a><spanclass="lineno"> 73</span> <spanclass="comment"> * hence we can simply check for j = N - i as we loop through i</span></div>
<divclass="line"><aname="l00075"></a><spanclass="lineno"> 75</span> <spanclass="keywordflow">for</span> (<spanclass="keywordtype">unsigned</span><spanclass="keywordtype">long</span> i = <aclass="code"href="../../d7/ddb/problem__23_2sol1_8c.html#ac5d600bf3077f4188afc4c5cd2c40eaf">get_next_abundant</a>(1); i <= (<aclass="code"href="../../db/d01/problem__13_2sol1_8c.html#a0240ac851181b84ac374872dc5434ee4">N</a>>> 1);</div>
<divclass="line"><aname="l00076"></a><spanclass="lineno"> 76</span>  i = <aclass="code"href="../../d7/ddb/problem__23_2sol1_8c.html#ac5d600bf3077f4188afc4c5cd2c40eaf">get_next_abundant</a>(i))</div>
<divclass="center"><iframescrolling="no"frameborder="0"src="../../d7/ddb/problem__23_2sol1_8c_a3ab61b5a1c4f2288625d160aa0ea8478_cgraph.svg"width="659"height="63"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
<divclass="line"><aname="l00090"></a><spanclass="lineno"> 90</span> <spanclass="keywordtype">unsigned</span><spanclass="keywordtype">long</span> sum = 0;</div>
<divclass="line"><aname="l00098"></a><spanclass="lineno"> 98</span>  printf(<spanclass="stringliteral">"Not using parallleization!\n"</span>);</div>
<divclass="line"><aname="l00106"></a><spanclass="lineno"> 106</span> <spanclass="keywordflow">for</span> (i = 1; i <= <aclass="code"href="../../d7/ddb/problem__23_2sol1_8c.html#a337e545af040d754dc012b42523ee1ee">MAX_N</a>; i++)</div>
<divclass="line"><aname="l00121"></a><spanclass="lineno"> 121</span> <spanclass="stringliteral">"Sum of numbers that cannot be represented as sum of two abundant "</span></div>
<divclass="center"><divclass="zoom"><iframescrolling="no"frameborder="0"src="../../d7/ddb/problem__23_2sol1_8c_a3c04138a5bfe5d72780bb7e82a18e627_cgraph.svg"width="100%"height="300"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
<tdclass="memname">unsigned long MAX_N = 28123</td>
</tr>
</table>
</div><divclass="memdoc">
<p>upper limit of numbers to check </p>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<divclass="ttc"id="aproblem__23_2sol1_8c_html_ac5d600bf3077f4188afc4c5cd2c40eaf"><divclass="ttname"><ahref="../../d7/ddb/problem__23_2sol1_8c.html#ac5d600bf3077f4188afc4c5cd2c40eaf">get_next_abundant</a></div><divclass="ttdeci">unsigned long get_next_abundant(unsigned long N)</div><divclass="ttdef"><b>Definition:</b> sol1.c:55</div></div>
<divclass="ttc"id="aproblem__23_2sol1_8c_html_a4f128410e6582fe26488e2316cc96e17"><divclass="ttname"><ahref="../../d7/ddb/problem__23_2sol1_8c.html#a4f128410e6582fe26488e2316cc96e17">is_abundant</a></div><divclass="ttdeci">unsigned long is_abundant(unsigned long N)</div><divclass="ttdef"><b>Definition:</b> sol1.c:47</div></div>
<divclass="ttc"id="aproblem__23_2sol1_8c_html_a337e545af040d754dc012b42523ee1ee"><divclass="ttname"><ahref="../../d7/ddb/problem__23_2sol1_8c.html#a337e545af040d754dc012b42523ee1ee">MAX_N</a></div><divclass="ttdeci">unsigned long MAX_N</div><divclass="ttdef"><b>Definition:</b> sol1.c:13</div></div>
<divclass="ttc"id="aproblem__23_2sol1_8c_html_a1aca7f530f82b27100262adba9e7556b"><divclass="ttname"><ahref="../../d7/ddb/problem__23_2sol1_8c.html#a1aca7f530f82b27100262adba9e7556b">get_perfect_number</a></div><divclass="ttdeci">char get_perfect_number(unsigned long N)</div><divclass="ttdef"><b>Definition:</b> sol1.c:21</div></div>
<divclass="ttc"id="aproblem__23_2sol1_8c_html_a3ab61b5a1c4f2288625d160aa0ea8478"><divclass="ttname"><ahref="../../d7/ddb/problem__23_2sol1_8c.html#a3ab61b5a1c4f2288625d160aa0ea8478">is_sum_of_abundant</a></div><divclass="ttdeci">char is_sum_of_abundant(unsigned long N)</div><divclass="ttdef"><b>Definition:</b> sol1.c:69</div></div>
<!-- start footer part -->
<divid="nav-path"class="navpath"><!-- id is needed for treeview function! -->