﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?application progid="SMath Studio" version="0.95"?>
<regions>
  <settings>
    <calculation>
      <precision>4</precision>
      <exponentialThreshold>5</exponentialThreshold>
      <fractions>decimal</fractions>
    </calculation>
    <pageModel active="true" printAreas="true" simpleEqualsOnly="false">
      <paper id="1" orientation="Portrait" width="850" height="1100" />
      <margins left="39" right="39" top="39" bottom="39" />
      <header alignment="Center" color="#a9a9a9">&amp;[DATE] &amp;[TIME] - &amp;[FILENAME]</header>
      <footer alignment="Center" color="#a9a9a9">&amp;[PAGENUM] / &amp;[COUNT]</footer>
    </pageModel>
    <dependences>
      <assembly name="SMath Studio" version="0.95" guid="a37cba83-b69c-4c71-9992-55ff666763bd" />
      <assembly name="Text Region" version="1.8.4594.45" guid="485d28c5-349a-48b6-93be-12a35a1c1e39" />
      <assembly name="Special Functions" version="1.9.4594.42" guid="2814e667-4e12-48b1-8d51-194e480eabc5" />
      <assembly name="Math Region" version="0.95" guid="02f1ab51-215b-466e-a74d-5d8b1cf85e8d" />
    </dependences>
  </settings>
  <region id="0" left="18" top="27" width="577" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="eng">
      <p bold="true" underline="true">Programming the song "99 bottles of beer on the wall" in SMath Studio</p>
    </text>
  </region>
  <region id="1" left="18" top="45" width="185" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="eng">
      <p>(preliminary version)</p>
    </text>
  </region>
  <region id="2" left="81" top="81" width="529" height="206" color="#000000" bgColor="#ffffff" fontSize="10">
    <math>
      <input>
        <e type="operand">n</e>
        <e type="function" args="1">BofB</e>
        <e type="operand">S1</e>
        <e type="operand" style="string"> bottles of beer</e>
        <e type="operator" args="2">:</e>
        <e type="operand">S2</e>
        <e type="operand" style="string"> on the wall, </e>
        <e type="operator" args="2">:</e>
        <e type="operand">S3</e>
        <e type="operand" style="string">Take one out and pass it around,</e>
        <e type="operator" args="2">:</e>
        <e type="operand">j</e>
        <e type="operand">0</e>
        <e type="operator" args="2">:</e>
        <e type="operand">k</e>
        <e type="operand">n</e>
        <e type="operand">1</e>
        <e type="operand">n</e>
        <e type="operand">1</e>
        <e type="operator" args="2">-</e>
        <e type="function" preserve="true" args="3">range</e>
        <e type="operand">j</e>
        <e type="operand">j</e>
        <e type="operand">1</e>
        <e type="operator" args="2">+</e>
        <e type="operator" args="2">:</e>
        <e type="operand">SS</e>
        <e type="operand">j</e>
        <e type="function" preserve="true" args="2">el</e>
        <e type="operand">k</e>
        <e type="function" preserve="true" args="1">num2str</e>
        <e type="operand">S1</e>
        <e type="operand">S2</e>
        <e type="operand">k</e>
        <e type="function" preserve="true" args="1">num2str</e>
        <e type="operand">S1</e>
        <e type="operand" style="string">.</e>
        <e type="function" preserve="true" args="6">concat</e>
        <e type="operator" args="2">:</e>
        <e type="operand">j</e>
        <e type="operand">j</e>
        <e type="operand">1</e>
        <e type="operator" args="2">+</e>
        <e type="operator" args="2">:</e>
        <e type="operand">SS</e>
        <e type="operand">j</e>
        <e type="function" preserve="true" args="2">el</e>
        <e type="operand">S3</e>
        <e type="operand">k</e>
        <e type="operand">1</e>
        <e type="operator" args="2">-</e>
        <e type="function" preserve="true" args="1">num2str</e>
        <e type="operand">S1</e>
        <e type="operand">S2</e>
        <e type="operand" style="string">.</e>
        <e type="function" preserve="true" args="5">concat</e>
        <e type="operator" args="2">:</e>
        <e type="operand">4</e>
        <e type="operand">1</e>
        <e type="function" preserve="true" args="6">line</e>
        <e type="function" preserve="true" args="3">for</e>
        <e type="operand">SS</e>
        <e type="operand">6</e>
        <e type="operand">1</e>
        <e type="function" preserve="true" args="8">line</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="3" left="27" top="288" width="591" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="eng">
      <p underline="true">Testing for n = 10 (n = 99 would produce a waaaay big amount of output)</p>
    </text>
  </region>
  <region id="4" left="18" top="315" width="651" height="368" color="#000000" bgColor="#ffffff" fontSize="10">
    <math>
      <input>
        <e type="operand">10</e>
        <e type="function" args="1">BofB</e>
      </input>
      <result action="numeric">
        <e type="operand" style="string">10 bottles of beer on the wall, 10 bottles of beer.</e>
        <e type="operand" style="string">Take one out and pass it around,9 bottles of beer on the wall, .</e>
        <e type="operand" style="string">9 bottles of beer on the wall, 9 bottles of beer.</e>
        <e type="operand" style="string">Take one out and pass it around,8 bottles of beer on the wall, .</e>
        <e type="operand" style="string">8 bottles of beer on the wall, 8 bottles of beer.</e>
        <e type="operand" style="string">Take one out and pass it around,7 bottles of beer on the wall, .</e>
        <e type="operand" style="string">7 bottles of beer on the wall, 7 bottles of beer.</e>
        <e type="operand" style="string">Take one out and pass it around,6 bottles of beer on the wall, .</e>
        <e type="operand" style="string">6 bottles of beer on the wall, 6 bottles of beer.</e>
        <e type="operand" style="string">Take one out and pass it around,5 bottles of beer on the wall, .</e>
        <e type="operand" style="string">5 bottles of beer on the wall, 5 bottles of beer.</e>
        <e type="operand" style="string">Take one out and pass it around,4 bottles of beer on the wall, .</e>
        <e type="operand" style="string">4 bottles of beer on the wall, 4 bottles of beer.</e>
        <e type="operand" style="string">Take one out and pass it around,3 bottles of beer on the wall, .</e>
        <e type="operand" style="string">3 bottles of beer on the wall, 3 bottles of beer.</e>
        <e type="operand" style="string">Take one out and pass it around,2 bottles of beer on the wall, .</e>
        <e type="operand" style="string">2 bottles of beer on the wall, 2 bottles of beer.</e>
        <e type="operand" style="string">Take one out and pass it around,1 bottles of beer on the wall, .</e>
        <e type="operand" style="string">1 bottles of beer on the wall, 1 bottles of beer.</e>
        <e type="operand" style="string">Take one out and pass it around,0 bottles of beer on the wall, .</e>
        <e type="operand">20</e>
        <e type="operand">1</e>
        <e type="function" preserve="true" args="22">mat</e>
      </result>
    </math>
  </region>
</regions>