<?xml version="1.0"?>
<flowgorithm fileversion="2.11">
    <attributes>
        <attribute name="name" value=""/>
        <attribute name="authors" value="burrin"/>
        <attribute name="about" value=""/>
        <attribute name="saved" value="2020-10-27 04:41:25 PM"/>
        <attribute name="created" value="YnVycmluO0RFU0tUT1AtNzQ5RDJJRjsyMDIwLTEwLTI3OzAzOjUyOjM0IFBNOzI5NDE="/>
        <attribute name="edited" value="YnVycmluO0RFU0tUT1AtNzQ5RDJJRjsyMDIwLTEwLTI3OzA0OjQxOjI1IFBNOzQ7MzA1MQ=="/>
    </attributes>
    <function name="Main" type="None" variable="">
        <parameters/>
        <body>
            <declare name="CART" type="String" array="True" size="100"/>
            <declare name="count" type="Integer" array="False" size=""/>
            <declare name="Maximum" type="Integer" array="False" size=""/>
            <declare name="item" type="Integer" array="False" size=""/>
            <assign variable="item" expression="1"/>
            <declare name="discount" type="Integer" array="False" size=""/>
            <declare name="DiscountPercent" type="Integer" array="False" size=""/>
            <declare name="Price" type="Real" array="False" size=""/>
            <declare name="Total" type="Real" array="False" size=""/>
            <declare name="GrandTotal" type="Real" array="False" size=""/>
            <declare name="many" type="Integer" array="False" size=""/>
            <assign variable="Many" expression="0"/>
            <assign variable="GrandTotal" expression="0"/>
            <assign variable="count" expression="0"/>
            <input variable="Maximum"/>
            <while expression="item != 0">
                <output expression="&quot;You have &#163;&quot;&amp;Maximum&amp; &quot; Available to spend&quot;" newline="True"/>
                <output expression="&quot;1) Roses  =  $75.00 per 1/2 dozen (25% discount)&#13;&#10;&quot; &amp;&#13;&#10;&quot;2) Hair extensions =  $100 per pack (10% discount) &#13;&#10;&quot; &amp;&#13;&#10;&quot;3) Male Jeans = $150.00&#13;&#10;&quot; &amp; &#13;&#10;&quot;4)Female Jeans = $175.00 (5% discount)&#13;&#10;&quot;&amp;&#13;&#10;&quot;5)Jordans = $200.00 &quot;" newline="True"/>
                <input variable="Item"/>
                <if expression="item == 1">
                    <then>
                        <input variable="Many"/>
                        <output expression="&quot;IS thre a discount?&quot;" newline="True"/>
                        <input variable="discount"/>
                        <if expression="discount == 1">
                            <then>
                                <input variable="DiscountPercent"/>
                                <assign variable="Price" expression="75-(75 * 0.25)"/>
                            </then>
                            <else>
                                <assign variable="Price" expression="75"/>
                            </else>
                        </if>
                        <if expression="Price * Many &lt; Maximum">
                            <then>
                                <assign variable="Maximum" expression="Maximum - (Price * Many)"/>
                                <assign variable="CART[count]" expression="&quot;Roses&quot;"/>
                                <assign variable="count" expression="count + 1"/>
                            </then>
                            <else>
                                <output expression="&quot;you can't afford this&quot;" newline="True"/>
                            </else>
                        </if>
                        <assign variable="GrandTotal" expression="Price * Many"/>
                    </then>
                    <else>
                        <if expression="item ==2">
                            <then>
                                <input variable="Many"/>
                                <output expression="&quot;IS thre a discount?&quot;" newline="True"/>
                                <input variable="discount"/>
                                <if expression="discount == 1">
                                    <then>
                                        <input variable="DiscountPercent"/>
                                    </then>
                                    <else/>
                                </if>
                            </then>
                            <else>
                                <if expression="item == 3">
                                    <then>
                                        <input variable="Many"/>
                                        <output expression="&quot;IS thre a discount?&quot;" newline="True"/>
                                        <input variable="discount"/>
                                        <if expression="discount == 1">
                                            <then>
                                                <input variable="DiscountPercent"/>
                                            </then>
                                            <else/>
                                        </if>
                                    </then>
                                    <else>
                                        <if expression="item ==4">
                                            <then>
                                                <input variable="Many"/>
                                                <output expression="&quot;IS thre a discount?&quot;" newline="True"/>
                                                <input variable="discount"/>
                                                <if expression="discount == 1">
                                                    <then>
                                                        <input variable="DiscountPercent"/>
                                                    </then>
                                                    <else/>
                                                </if>
                                            </then>
                                            <else>
                                                <if expression="item == 5">
                                                    <then>
                                                        <input variable="Many"/>
                                                        <output expression="&quot;IS thre a discount?&quot;" newline="True"/>
                                                        <input variable="discount"/>
                                                        <if expression="discount == 1">
                                                            <then>
                                                                <input variable="DiscountPercent"/>
                                                            </then>
                                                            <else/>
                                                        </if>
                                                    </then>
                                                    <else/>
                                                </if>
                                            </else>
                                        </if>
                                    </else>
                                </if>
                            </else>
                        </if>
                    </else>
                </if>
                <output expression="&quot;You have &quot; &amp;count &amp; &quot; in you cart &quot; &amp; &quot;and have spent &#163;&quot; &amp;GrandTotal &amp;&quot; and have &#163; &quot;&amp; Maximum&amp; &quot; left&quot;" newline="True"/>
            </while>
        </body>
    </function>
</flowgorithm>
