<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:NimbusRomNo9L-Regu;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:CMMI10;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:CMR10;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:CMSY10;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:NimbusMonL-Regu;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:EN-US;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:EN-US;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-AU" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Very new to Software Development and it&#8217;s been 20 odd years since programming at Uni, I could use some help with a problem.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I recently had students involved in the Melbourne University Programming Competition and had problems with solving the following question:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU">A positive integer
</span><span style="font-family:CMMI10;mso-fareast-language:EN-AU">x &gt; </span><span style="font-family:CMR10;mso-fareast-language:EN-AU">1
</span><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU">is a prime if its only factors are
</span><span style="font-family:CMR10;mso-fareast-language:EN-AU">1 </span><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU">and
</span><span style="font-family:CMMI10;mso-fareast-language:EN-AU">x</span><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU">. Hence the numbers
</span><span style="font-family:CMR10;mso-fareast-language:EN-AU">2</span><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU">,
</span><span style="font-family:CMR10;mso-fareast-language:EN-AU">11</span><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU">, and
</span><span style="font-family:CMR10;mso-fareast-language:EN-AU">101 </span><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU">are primes, but
</span><span style="font-family:CMR10;mso-fareast-language:EN-AU">1</span><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU">,
</span><span style="font-family:CMR10;mso-fareast-language:EN-AU">9</span><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU">,<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU">and
</span><span style="font-family:CMR10;mso-fareast-language:EN-AU">1001 </span><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU">are not prime*.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU">The input to your program is a single positive integer
</span><span style="font-family:CMMI10;mso-fareast-language:EN-AU">n</span><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU">. The output should be the number of primes that are
</span><span style="font-family:CMSY10;mso-fareast-language:EN-AU">_ </span><span style="font-family:CMMI10;mso-fareast-language:EN-AU">n</span><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU">.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU">For example, if the input is
</span><span style="font-family:NimbusMonL-Regu;mso-fareast-language:EN-AU">1000 </span>
<span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU">then the output is
</span><span style="font-family:NimbusMonL-Regu;mso-fareast-language:EN-AU">168</span><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU">.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU">* In case you&#8217;re wondering,
</span><span style="font-family:CMR10;mso-fareast-language:EN-AU">1001 = 7 </span>
<span style="font-family:CMSY10;mso-fareast-language:EN-AU">_ </span><span style="font-family:CMR10;mso-fareast-language:EN-AU">11
</span><span style="font-family:CMSY10;mso-fareast-language:EN-AU">_ </span><span style="font-family:CMR10;mso-fareast-language:EN-AU">13</span><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU">.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU">Your five answers should be for<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU">1.
</span><span style="font-family:CMMI10;mso-fareast-language:EN-AU">n </span><span style="font-family:CMR10;mso-fareast-language:EN-AU">= 10<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU">2.
</span><span style="font-family:CMMI10;mso-fareast-language:EN-AU">n </span><span style="font-family:CMR10;mso-fareast-language:EN-AU">= 100<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU">3.
</span><span style="font-family:CMMI10;mso-fareast-language:EN-AU">n </span><span style="font-family:CMR10;mso-fareast-language:EN-AU">= 100</span><span style="font-family:CMMI10;mso-fareast-language:EN-AU">;
</span><span style="font-family:CMR10;mso-fareast-language:EN-AU">000<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU">4.
</span><span style="font-family:CMMI10;mso-fareast-language:EN-AU">n </span><span style="font-family:CMR10;mso-fareast-language:EN-AU">= 10</span><span style="font-family:CMMI10;mso-fareast-language:EN-AU">;
</span><span style="font-family:CMR10;mso-fareast-language:EN-AU">000</span><span style="font-family:CMMI10;mso-fareast-language:EN-AU">;
</span><span style="font-family:CMR10;mso-fareast-language:EN-AU">000<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU">5.
</span><span style="font-family:CMMI10;mso-fareast-language:EN-AU">n </span><span style="font-family:CMR10;mso-fareast-language:EN-AU">= 20</span><span style="font-family:CMMI10;mso-fareast-language:EN-AU">;
</span><span style="font-family:CMR10;mso-fareast-language:EN-AU">000</span><span style="font-family:CMMI10;mso-fareast-language:EN-AU">;
</span><span style="font-family:CMR10;mso-fareast-language:EN-AU">000<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family:NimbusRomNo9L-Regu;mso-fareast-language:EN-AU"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">We decided to solve in Small Basic so as to get a handle on lops and arrays, but did not manage to solve it. I found a solution online (below) but was not able to understand how the array worked. It doesn&#8217;t solve
 the problem exactly as it just lists the input number of primes, but it certain can calculate/select for primes.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-AU">Init</span><span style="font-size:12.0pt;font-family:Consolas;color:maroon;mso-fareast-language:EN-AU">:</span><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;color:#006060;mso-fareast-language:EN-AU">TextWindow</span><span style="font-size:12.0pt;font-family:Consolas;color:maroon;mso-fareast-language:EN-AU">.</span><span style="font-size:12.0pt;font-family:Consolas;color:#802020;mso-fareast-language:EN-AU">WriteLine</span><span style="font-size:12.0pt;font-family:Consolas;color:maroon;mso-fareast-language:EN-AU">(</span><span style="font-size:12.0pt;font-family:Consolas;color:#CC6633;mso-fareast-language:EN-AU">&quot;How
 many Prime numbers (1-1000)? &quot;</span><span style="font-size:12.0pt;font-family:Consolas;color:maroon;mso-fareast-language:EN-AU">)</span><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-AU">N</span><span style="font-size:12.0pt;font-family:Consolas;color:maroon;mso-fareast-language:EN-AU">=</span><span style="font-size:12.0pt;font-family:Consolas;color:#006060;mso-fareast-language:EN-AU">TextWindow</span><span style="font-size:12.0pt;font-family:Consolas;color:maroon;mso-fareast-language:EN-AU">.</span><span style="font-size:12.0pt;font-family:Consolas;color:#802020;mso-fareast-language:EN-AU">ReadNumber</span><span style="font-size:12.0pt;font-family:Consolas;color:maroon;mso-fareast-language:EN-AU">()</span><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><b><span style="font-size:12.0pt;font-family:Consolas;color:#7777FF;mso-fareast-language:EN-AU">If</span></b><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU">
<span style="color:black">N</span><span style="color:maroon">&lt;</span><span style="color:#DD6633">1</span>
<span style="color:maroon">Or</span> <span style="color:black">N</span><span style="color:maroon">&gt;</span><span style="color:#DD6633">1000</span>
<b><span style="color:#7777FF">Then</span></b><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;
<span style="color:#006060">TextWindow</span><span style="color:maroon">.</span><span style="color:#802020">WriteLine</span><span style="color:maroon">(</span><span style="color:#CC6633">&quot;That's All Folks!&quot;</span><span style="color:maroon">)</span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;
<span style="color:#006060">TextWindow</span><span style="color:maroon">.</span><span style="color:#802020">Pause</span><span style="color:maroon">()</span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;
<span style="color:#006060">Program</span><span style="color:maroon">.</span><span style="color:#802020">End</span><span style="color:maroon">()</span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><b><span style="font-size:12.0pt;font-family:Consolas;color:#7777FF;mso-fareast-language:EN-AU">EndIf</span></b><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-AU">Prime</span><span style="font-size:12.0pt;font-family:Consolas;color:maroon;mso-fareast-language:EN-AU">=</span><span style="font-size:12.0pt;font-family:Consolas;color:#CC6633;mso-fareast-language:EN-AU">&quot;1=2;&quot;</span><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-AU">Num</span><span style="font-size:12.0pt;font-family:Consolas;color:maroon;mso-fareast-language:EN-AU">=</span><span style="font-size:12.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-AU">Prime[</span><span style="font-size:12.0pt;font-family:Consolas;color:#006060;mso-fareast-language:EN-AU">Array</span><span style="font-size:12.0pt;font-family:Consolas;color:maroon;mso-fareast-language:EN-AU">.</span><span style="font-size:12.0pt;font-family:Consolas;color:#802020;mso-fareast-language:EN-AU">GetItemCount</span><span style="font-size:12.0pt;font-family:Consolas;color:maroon;mso-fareast-language:EN-AU">(</span><span style="font-size:12.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-AU">Prime</span><span style="font-size:12.0pt;font-family:Consolas;color:maroon;mso-fareast-language:EN-AU">)</span><span style="font-size:12.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-AU">]</span><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-AU">MainLoop</span><span style="font-size:12.0pt;font-family:Consolas;color:maroon;mso-fareast-language:EN-AU">:</span><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-AU">Num</span><span style="font-size:12.0pt;font-family:Consolas;color:maroon;mso-fareast-language:EN-AU">=</span><span style="font-size:12.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-AU">Num</span><span style="font-size:12.0pt;font-family:Consolas;color:maroon;mso-fareast-language:EN-AU">&#43;</span><span style="font-size:12.0pt;font-family:Consolas;color:#DD6633;mso-fareast-language:EN-AU">1</span><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;
<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;&nbsp;<span style="color:black">Flag</span><span style="color:maroon">=</span><span style="color:#DD6633">1</span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;
<b><span style="color:#7777FF">For</span></b> <span style="color:black">i</span><span style="color:maroon">=</span><span style="color:#DD6633">1</span>
<b><span style="color:#7777FF">To</span></b> <span style="color:#006060">Array</span><span style="color:maroon">.</span><span style="color:#802020">GetItemCount</span><span style="color:maroon">(</span><span style="color:black">Prime</span><span style="color:maroon">)</span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;&nbsp;&nbsp;
<b><span style="color:#7777FF">If</span></b> <span style="color:maroon">(</span><span style="color:#006060">Math</span><span style="color:maroon">.</span><span style="color:#802020">Remainder</span><span style="color:maroon">(</span><span style="color:black">Num</span><span style="color:maroon">,</span><span style="color:black">Prime[i]</span><span style="color:maroon">)=</span><span style="color:#DD6633">0</span><span style="color:maroon">)</span>
<b><span style="color:#7777FF">Then</span></b><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i><span style="color:#008020">'Not Prime</span></i><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style="color:black">Flag</span><span style="color:maroon">=</span><span style="color:#DD6633">0</span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style="color:black">i</span><span style="color:maroon">=</span><span style="color:#006060">Array</span><span style="color:maroon">.</span><span style="color:#802020">GetItemCount</span><span style="color:maroon">(</span><span style="color:black">Prime</span><span style="color:maroon">)</span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;&nbsp;&nbsp;
<b><span style="color:#7777FF">EndIf</span></b><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;
<b><span style="color:#7777FF">EndFor</span></b><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;
<b><span style="color:#7777FF">If</span></b> <span style="color:black">Flag</span><span style="color:maroon">=</span><span style="color:#DD6633">1</span>
<b><span style="color:#7777FF">Then</span></b><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;&nbsp;&nbsp;
<span style="color:black">Prime[</span><span style="color:#006060">Array</span><span style="color:maroon">.</span><span style="color:#802020">GetItemCount</span><span style="color:maroon">(</span><span style="color:black">Prime</span><span style="color:maroon">)&#43;</span><span style="color:#DD6633">1</span><span style="color:black">]</span><span style="color:maroon">=</span><span style="color:black">Num</span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;&nbsp;&nbsp;
<span style="color:#006060">TextWindow</span><span style="color:maroon">.</span><span style="color:#802020">Write</span><span style="color:maroon">(</span><span style="color:#006060">Array</span><span style="color:maroon">.</span><span style="color:#802020">GetItemCount</span><span style="color:maroon">(</span><span style="color:black">Prime</span><span style="color:maroon">))</span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;&nbsp;&nbsp;
<span style="color:#006060">TextWindow</span><span style="color:maroon">.</span><span style="color:#802020">WriteLine</span><span style="color:maroon">(</span><span style="color:#CC6633">&quot;&nbsp;&nbsp; &quot;</span><span style="color:maroon">&#43;</span><span style="color:black">Num</span><span style="color:maroon">)</span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;&nbsp;&nbsp;
<b><span style="color:#7777FF">if</span></b> <span style="color:#006060">Array</span><span style="color:maroon">.</span><span style="color:#802020">GetItemCount</span><span style="color:maroon">(</span><span style="color:black">Prime</span><span style="color:maroon">)&gt;=</span><span style="color:black">N</span>
<b><span style="color:#7777FF">Then</span></b><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<b><span style="color:#7777FF">Goto</span></b> <span style="color:black">Ender</span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;&nbsp;&nbsp;
<b><span style="color:#7777FF">EndIf</span></b><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;
<b><span style="color:#7777FF">EndIf</span></b><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;
<b><span style="color:#7777FF">Goto</span></b> <span style="color:black">MainLoop</span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;
<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-AU">Ender</span><span style="font-size:12.0pt;font-family:Consolas;color:maroon;mso-fareast-language:EN-AU">:</span><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><i><span style="font-size:12.0pt;font-family:Consolas;color:#008020;mso-fareast-language:EN-AU">'TextWindow.Write(&quot;Press any key to continue...&quot;)</span></i><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;color:#006060;mso-fareast-language:EN-AU">TextWindow</span><span style="font-size:12.0pt;font-family:Consolas;color:maroon;mso-fareast-language:EN-AU">.</span><span style="font-size:12.0pt;font-family:Consolas;color:#802020;mso-fareast-language:EN-AU">WriteLine</span><span style="font-size:12.0pt;font-family:Consolas;color:maroon;mso-fareast-language:EN-AU">(</span><span style="font-size:12.0pt;font-family:Consolas;color:#CC6633;mso-fareast-language:EN-AU">&quot;---&quot;</span><span style="font-size:12.0pt;font-family:Consolas;color:maroon;mso-fareast-language:EN-AU">)</span><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:Consolas;color:#006060;mso-fareast-language:EN-AU">TextWindow</span><span style="font-size:12.0pt;font-family:Consolas;color:maroon;mso-fareast-language:EN-AU">.</span><span style="font-size:12.0pt;font-family:Consolas;color:#802020;mso-fareast-language:EN-AU">Pause</span><span style="font-size:12.0pt;font-family:Consolas;color:maroon;mso-fareast-language:EN-AU">()</span><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU"><o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:12.0pt;font-family:Consolas;color:#7777FF;mso-fareast-language:EN-AU">Goto</span></b><span style="font-size:12.0pt;font-family:Consolas;mso-fareast-language:EN-AU">
<span style="color:black">Init<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:Consolas;color:black;mso-fareast-language:EN-AU"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Can anyone &nbsp;give me a brief written description, or point me to an online resource that can explain how this array functions? Can anyone identify a Small Basic function more suited to this problem?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Vic<o:p></o:p></span></p>
</div>
</body>
</html>