<?xml version="1.0"?>
<flowgorithm fileversion="2.11">
    <attributes>
        <attribute name="name" value=""/>
        <attribute name="authors" value="burrind"/>
        <attribute name="about" value=""/>
        <attribute name="saved" value="2021-11-18 02:12:46 PM"/>
        <attribute name="created" value="YnVycmluZDtETlRWQS1UV0stMDEzOzIwMjEtMTEtMTg7MDE6MjE6MDQgUE07Mjg5MQ=="/>
        <attribute name="edited" value="YnVycmluZDtETlRWQS1UV0stMDEzOzIwMjEtMTEtMTg7MDI6MTI6NDYgUE07MTA7MzA1NA=="/>
    </attributes>
    <function name="Main" type="None" variable="">
        <parameters/>
        <body>
            <declare name="total" type="Integer" array="False" size=""/>
            <assign variable="total" expression="0"/>
            <declare name="most" type="Integer" array="False" size=""/>
            <declare name="Letters" type="Integer" array="True" size="26"/>
            <declare name="counter" type="Integer" array="False" size=""/>
            <declare name="OrdValue" type="Integer" array="False" size=""/>
            <declare name="word" type="String" array="False" size=""/>
            <assign variable="word" expression="&quot;AABBCCDDZZZZA&quot;"/>
            <assign variable="OrdValue" expression="65"/>
            <for variable="counter" start="0" end="25" direction="inc" step="1">
                <assign variable="Letters[counter]" expression="0"/>
            </for>
            <for variable="counter" start="0" end="len(word)-1" direction="inc" step="1">
                <assign variable="Letters[ToCode(char(word,counter)) - 65]" expression="Letters[ToCode(char(word,counter)) - 65]+1"/>
            </for>
            <for variable="counter" start="0" end="25" direction="inc" step="1">
                <if expression="letters[counter] &gt;total">
                    <then>
                        <assign variable="most" expression="counter+65"/>
                        <assign variable="total" expression="letters[counter]"/>
                    </then>
                    <else/>
                </if>
            </for>
            <output expression="&quot;The most common letter is &quot; &amp;ToChar(most)" newline="True"/>
        </body>
    </function>
</flowgorithm>
