<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6915086716970419401</id><updated>2011-06-10T12:21:36.238-07:00</updated><title type='text'>CIS 122 Algorithms &amp; Programs</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cis122.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6915086716970419401/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://cis122.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Michael Hennessy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6915086716970419401.post-3550911995449426610</id><published>2008-10-22T15:59:00.000-07:00</published><updated>2008-10-22T16:37:27.794-07:00</updated><title type='text'>4-11-liang.cpp</title><content type='html'>Debugged example from class (W week 4):&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#include &amp;lt;iostream&amp;gt;&lt;br /&gt;using namespace std;&lt;br /&gt;&lt;br /&gt;const int NUMBER_OF_PRIMES = 50;&lt;br /&gt;const int NUMBER_OF_PRIMES_PER_LINE = 10;&lt;br /&gt;&lt;br /&gt;int main(){&lt;br /&gt;&lt;br /&gt;  int count = 0; // Count the number of prime numbers&lt;br /&gt;  int number = 2; // A number to be tested for primeness&lt;br /&gt;  bool isPrime; // Is the current number prime?&lt;br /&gt;  int divisor; // loop control var&lt;br /&gt;&lt;br /&gt;  cout &lt;&lt; "The first 50 prime numbers are \n";&lt;br /&gt;&lt;br /&gt;  //generate 50 primes&lt;br /&gt;  while (count &lt; NUMBER_OF_PRIMES){&lt;br /&gt;    // Test if number is prime&lt;br /&gt;    divisor = 2;&lt;br /&gt;    while (number % divisor != 0)&lt;br /&gt;      divisor++;&lt;br /&gt;    // prime, if divisor == number&lt;br /&gt;    isPrime = (divisor == number);&lt;br /&gt;&lt;br /&gt;    //if number is prime, then print&lt;br /&gt;    if (isPrime){&lt;br /&gt;      //found one more&lt;br /&gt;      count++; &lt;br /&gt;      //print in table&lt;br /&gt;      if (count % NUMBER_OF_PRIMES_PER_LINE == 0){&lt;br /&gt;         // Print &amp; go to new line&lt;br /&gt;         cout &lt;&lt; number &lt;&lt; endl;&lt;br /&gt;      }&lt;br /&gt;      else&lt;br /&gt;         cout &lt;&lt; number &lt;&lt; " ";&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    //generate next potential prime&lt;br /&gt;    number++;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6915086716970419401-3550911995449426610?l=cis122.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cis122.blogspot.com/feeds/3550911995449426610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6915086716970419401&amp;postID=3550911995449426610' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6915086716970419401/posts/default/3550911995449426610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6915086716970419401/posts/default/3550911995449426610'/><link rel='alternate' type='text/html' href='http://cis122.blogspot.com/2008/10/4-11-liangcpp.html' title='4-11-liang.cpp'/><author><name>Michael Hennessy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6915086716970419401.post-4234325945854024644</id><published>2008-10-22T15:17:00.001-07:00</published><updated>2008-10-22T16:48:06.772-07:00</updated><title type='text'>Project 3 Discussion</title><content type='html'>Post your questions (and answers) about project 3 by adding a Comment to this blog entry.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6915086716970419401-4234325945854024644?l=cis122.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cis122.blogspot.com/feeds/4234325945854024644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6915086716970419401&amp;postID=4234325945854024644' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6915086716970419401/posts/default/4234325945854024644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6915086716970419401/posts/default/4234325945854024644'/><link rel='alternate' type='text/html' href='http://cis122.blogspot.com/2008/10/project-3-discussion.html' title='Project 3 Discussion'/><author><name>Michael Hennessy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6915086716970419401.post-5564564376539013993</id><published>2008-10-15T13:29:00.000-07:00</published><updated>2008-10-22T16:35:28.175-07:00</updated><title type='text'>How to Subscribe</title><content type='html'>If you have a question about a project, add a comment to the project post. Anyone in class with an answer may reply-- our own version of the &lt;a href="http://en.wikipedia.org/wiki/Wisdom_of_Crowds"&gt;wisdom of crowds&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Crowdsourcing"&gt;crowdsourcing&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;You can subscribe to this blog's RSS feed by using Firefox's Live Bookmarks feature. Then all new posts will be "pushed" to your browser. Here's how to do it:&lt;br /&gt;&lt;br /&gt;1. In Firefox choose Bookmarks &gt; Organize Bookmarks, and create a "Feeds" folder on the bookmarks toolbar.&lt;br /&gt;&lt;br /&gt;2. Open this blog in Firefox, scroll to the bottom and click on "Subscribe to: Posts (Atom)". A new page will open in the browser: select Live Bookmarks in the drop-down list, and click Subscribe Now. Add the bookmark to your Feeds folder. Presto!&lt;br /&gt;&lt;br /&gt;The drawback to using Live Bookmarks is that the bookmarks exist only on the computer you used to subscribe. An alternative is to use a hosted feed reader such as &lt;a href="http://www.google.com/reader/view/#overview-page"&gt;Google Reader&lt;/a&gt;. Then your feeds are stored in the "&lt;a href="http://en.wikipedia.org/wiki/Cloud_computing"&gt;cloud&lt;/a&gt;" and may be accessed from any machine by logging in to your Google account.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6915086716970419401-5564564376539013993?l=cis122.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cis122.blogspot.com/feeds/5564564376539013993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6915086716970419401&amp;postID=5564564376539013993' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6915086716970419401/posts/default/5564564376539013993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6915086716970419401/posts/default/5564564376539013993'/><link rel='alternate' type='text/html' href='http://cis122.blogspot.com/2008/10/project-1-discussion.html' title='How to Subscribe'/><author><name>Michael Hennessy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
