<?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="2021-01-23 11:55:11 AM"/>
        <attribute name="created" value="YnVycmluO0RFU0tUT1AtNzQ5RDJJRjsyMDIxLTAxLTIzOzExOjA3OjIyIEFNOzI5MTk="/>
        <attribute name="edited" value="YnVycmluO0RFU0tUT1AtNzQ5RDJJRjsyMDIxLTAxLTIzOzExOjU1OjExIEFNOzE2OzMwODI="/>
    </attributes>
    <function name="Main" type="None" variable="">
        <parameters/>
        <body>
            <declare name="distinct" type="Integer" array="False" size=""/>
            <declare name="word" type="String" array="False" size=""/>
            <input variable="word"/>
            <assign variable="distinct" expression="findDistinct(word)"/>
            <output expression="&quot;There are &quot; &amp;distinct &amp;&quot; distinct letters in &quot;&amp;word" newline="True"/>
        </body>
    </function>
    <function name="findDistinct" type="Integer" variable="numDistinct">
        <parameters>
            <parameter name="word" type="String" array="False"/>
        </parameters>
        <body>
            <declare name="letter2Check" type="String" array="False" size=""/>
            <declare name="counter" type="Integer" array="False" size=""/>
            <assign variable="counter" expression="0"/>
            <declare name="counter2" type="Integer" array="False" size=""/>
            <declare name="in" type="Integer" array="False" size=""/>
            <assign variable="in" expression="0"/>
            <declare name="numDistinct" type="Integer" array="False" size=""/>
            <assign variable="numDistinct" expression="0"/>
            <for variable="counter" start="0" end="len(word)-1" direction="inc" step="1">
                <assign variable="in" expression="0"/>
                <assign variable="letter2check" expression="char(word,counter)"/>
                <if expression="(ToCode(letter2check) &gt;=65 and ToCode(letter2check) &lt;=90) OR (ToCode(letter2check) &gt;=97 and ToCode(letter2check) &lt;=122)">
                    <then>
                        <for variable="counter2" start="counter" end="len(word)-1" direction="inc" step="1">
                            <if expression="char(word,counter2)== letter2check">
                                <then>
                                    <assign variable="in" expression="in+1"/>
                                </then>
                                <else/>
                            </if>
                        </for>
                        <if expression="in ==1">
                            <then>
                                <assign variable="numDistinct" expression="numDistinct+1"/>
                            </then>
                            <else/>
                        </if>
                    </then>
                    <else/>
                </if>
            </for>
        </body>
    </function>
</flowgorithm>
