{"id":34,"date":"2021-02-13T15:41:30","date_gmt":"2021-02-13T15:41:30","guid":{"rendered":"http:\/\/danielpgleason.com\/?p=34"},"modified":"2021-02-20T19:26:04","modified_gmt":"2021-02-20T19:26:04","slug":"fizzbuzz-solution","status":"publish","type":"post","link":"https:\/\/danielpgleason.com\/index.php\/2021\/02\/13\/fizzbuzz-solution\/","title":{"rendered":"FizzBuzz Solution"},"content":{"rendered":"\n<p>So I wrote up a solution for the FizzBuzz problem, here it is<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#include &lt;iostream&gt;<br><br>using namespace std;<br><br>int main()<br>{<br>    for (int i = 1; i &lt;= 100; i++)<br>    {<br>        if (i % 3 == 0 &amp;&amp; i % 5 == 0)<br>        {<br>            cout &lt;&lt; \"FizzBuzz\" &lt;&lt; endl;<br>            continue;<br>        }<br><br>        if (i % 3 == 0)<br>        {<br>            cout &lt;&lt; \"Fizz\" &lt;&lt; endl;<br>            continue;<br>        }<br><br>        if (i % 5 == 0)<br>        {<br>            cout &lt;&lt; \"Buzz\" &lt;&lt; endl;<br>            continue;<br>        }<br><br>        cout &lt;&lt; i &lt;&lt; endl;<br><br>    }<br><br>    return 0;<br>}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>So I wrote up a solution for the FizzBuzz problem, here it is #include &lt;iostream&gt;using namespace std;int main(){ for (int i = 1; i &lt;= 100; i++) { if (i % 3 == 0 &amp;&amp; i % 5 == 0) { cout &lt;&lt; &#8220;FizzBuzz&#8221; &lt;&lt; endl; continue; } if (i % 3 == 0) { &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/danielpgleason.com\/index.php\/2021\/02\/13\/fizzbuzz-solution\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;FizzBuzz Solution&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[11],"tags":[5,4,6,3,7],"class_list":["post-34","post","type-post","status-publish","format-standard","hentry","category-algorithms","tag-buzz","tag-fizz","tag-fizz-buzz","tag-fizzbuzz","tag-interview-questions"],"_links":{"self":[{"href":"https:\/\/danielpgleason.com\/index.php\/wp-json\/wp\/v2\/posts\/34"}],"collection":[{"href":"https:\/\/danielpgleason.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/danielpgleason.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/danielpgleason.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/danielpgleason.com\/index.php\/wp-json\/wp\/v2\/comments?post=34"}],"version-history":[{"count":1,"href":"https:\/\/danielpgleason.com\/index.php\/wp-json\/wp\/v2\/posts\/34\/revisions"}],"predecessor-version":[{"id":35,"href":"https:\/\/danielpgleason.com\/index.php\/wp-json\/wp\/v2\/posts\/34\/revisions\/35"}],"wp:attachment":[{"href":"https:\/\/danielpgleason.com\/index.php\/wp-json\/wp\/v2\/media?parent=34"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/danielpgleason.com\/index.php\/wp-json\/wp\/v2\/categories?post=34"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/danielpgleason.com\/index.php\/wp-json\/wp\/v2\/tags?post=34"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}