<divclass="center"><iframescrolling="no"frameborder="0"src="../../d8/d48/problem__10_2sol1_8c__incl.svg"width="248"height="127"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
<trclass="memitem:acc871ab6bfead702e983a7f9c412915f"><tdclass="memItemLeft"align="right"valign="top">char </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="../../d0/d6d/problem__10_2sol1_8c.html#acc871ab6bfead702e983a7f9c412915f">is_prime</a> (unsigned long n)</td></tr>
<trclass="memdesc:acc871ab6bfead702e983a7f9c412915f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Function to check if a number is prime. <ahref="../../d0/d6d/problem__10_2sol1_8c.html#acc871ab6bfead702e983a7f9c412915f">More...</a><br/></td></tr>
<trclass="memitem:ae3d987cb2ad0ddb0c3caa4c2506a20e5"><tdclass="memItemLeft"align="right"valign="top">unsigned long long </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="../../d0/d6d/problem__10_2sol1_8c.html#ae3d987cb2ad0ddb0c3caa4c2506a20e5">sum_of_primes</a> (unsigned long N)</td></tr>
<trclass="memdesc:ae3d987cb2ad0ddb0c3caa4c2506a20e5"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Computes sum of prime numbers less than N. <ahref="../../d0/d6d/problem__10_2sol1_8c.html#ae3d987cb2ad0ddb0c3caa4c2506a20e5">More...</a><br/></td></tr>
<divclass="line"><aid="l00035"name="l00035"></a><spanclass="lineno"> 35</span><spanclass="keywordtype">unsigned</span><spanclass="keywordtype">long</span> n = 100;</div>
<divclass="line"><aid="l00037"name="l00037"></a><spanclass="lineno"> 37</span><spanclass="keywordflow">if</span> (argc == 2) <spanclass="comment">/* if command line argument is provided */</span></div>
<divclass="line"><aid="l00038"name="l00038"></a><spanclass="lineno"> 38</span> n = atol(argv[1]); <spanclass="comment">/* use that as the upper limit */</span></div>
<divclass="ttc"id="aproblem__10_2sol1_8c_html_ae3d987cb2ad0ddb0c3caa4c2506a20e5"><divclass="ttname"><ahref="../../d0/d6d/problem__10_2sol1_8c.html#ae3d987cb2ad0ddb0c3caa4c2506a20e5">sum_of_primes</a></div><divclass="ttdeci">unsigned long long sum_of_primes(unsigned long N)</div><divclass="ttdoc">Computes sum of prime numbers less than N.</div><divclass="ttdef"><b>Definition:</b> sol1.c:21</div></div>
</div><!-- fragment --><divclass="dynheader">
Here is the call graph for this function:</div>
<divclass="dyncontent">
<divclass="center"><iframescrolling="no"frameborder="0"src="../../d0/d6d/problem__10_2sol1_8c_a0ddf1224851353fc92bfbff6f499fa97_cgraph.svg"width="343"height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
<divclass="line"><aid="l00023"name="l00023"></a><spanclass="lineno"> 23</span><spanclass="keywordtype">unsigned</span><spanclass="keywordtype">long</span><spanclass="keywordtype">long</span> sum = 2;</div>
<divclass="line"><aid="l00025"name="l00025"></a><spanclass="lineno"> 25</span><spanclass="keywordflow">for</span> (<spanclass="keywordtype">long</span> i = 3; i < N; i += 2) <spanclass="comment">/* skip even numbers */</span></div>
<divclass="ttc"id="aproblem__10_2sol1_8c_html_acc871ab6bfead702e983a7f9c412915f"><divclass="ttname"><ahref="../../d0/d6d/problem__10_2sol1_8c.html#acc871ab6bfead702e983a7f9c412915f">is_prime</a></div><divclass="ttdeci">char is_prime(unsigned long n)</div><divclass="ttdoc">Function to check if a number is prime.</div><divclass="ttdef"><b>Definition:</b> sol1.c:11</div></div>
</div><!-- fragment --><divclass="dynheader">
Here is the call graph for this function:</div>
<divclass="dyncontent">
<divclass="center"><iframescrolling="no"frameborder="0"src="../../d0/d6d/problem__10_2sol1_8c_ae3d987cb2ad0ddb0c3caa4c2506a20e5_cgraph.svg"width="244"height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
<liclass="footer">Generated by <ahref="https://www.doxygen.org/index.html"><imgclass="footer"src="../../doxygen.svg"width="104"height="31"alt="doxygen"/></a> 1.9.2 </li>