<?xml version="1.0"?>
<flowgorithm fileversion="3.0">
    <attributes>
        <attribute name="name" value=""/>
        <attribute name="authors" value="Riccardo"/>
        <attribute name="about" value=""/>
        <attribute name="saved" value="2023-03-21 03:41:06 "/>
        <attribute name="created" value="UmljY2FyZG87TEFQVE9QLU4xS0xTM0w1OzIwMjMtMDMtMTQ7IjA1OjI2OjI1ICI7MzA0Nw=="/>
        <attribute name="edited" value="UmljY2FyZG87TEFQVE9QLU4xS0xTM0w1OzIwMjMtMDMtMTQ7IjA1OjQ4OjI3ICI7MjszMTYy"/>
        <attribute name="edited" value="Ym9tYWw7TVNJOzIwMjMtMDMtMjE7IjAzOjQxOjA2ICI7MzsyMDQ4"/>
    </attributes>
    <function name="Main" type="None" variable="">
        <parameters/>
        <body>
            <declare name="spesa" type="Real" array="False" size=""/>
            <declare name="sconto" type="String" array="False" size=""/>
            <output expression="&quot;Dichiara l'importo della spesa&quot;" newline="True"/>
            <input variable="spesa"/>
            <while expression="(spesa&lt;0)">
                <output expression="&quot;Errore&quot;" newline="True"/>
            </while>
            <if expression="(spesa&gt;20)">
                <then>
                    <if expression="(spesa&gt;=50)">
                        <then>
                            <if expression="(spesa&gt;=80)">
                                <then>
                                    <if expression="(spesa&gt;100)">
                                        <then>
                                            <assign variable="sconto" expression="&quot;33%&quot;"/>
                                        </then>
                                        <else>
                                            <assign variable="sconto" expression="&quot;25%&quot;"/>
                                        </else>
                                    </if>
                                </then>
                                <else>
                                    <assign variable="sconto" expression="&quot;20%&quot;"/>
                                </else>
                            </if>
                        </then>
                        <else>
                            <assign variable="sconto" expression="&quot;10%&quot;"/>
                        </else>
                    </if>
                </then>
                <else>
                    <assign variable="sconto" expression="&quot;0%&quot;"/>
                </else>
            </if>
            <output expression="&quot;Lo sconto applicato &#232; del &quot; &amp; sconto" newline="True"/>
        </body>
    </function>
</flowgorithm>
