<?xml version="1.0"?>
<flowgorithm fileversion="1.7">
    <attributes>
        <attribute name="name" value=""/>
        <attribute name="authors" value="Damian"/>
        <attribute name="about" value=""/>
        <attribute name="saved" value="2017-03-04 08:45:16 PM"/>
        <attribute name="created" value="RGFtaWFuOyBEQU1JQU4tUEM7IDIwMTctMDMtMDQ7IDA4OjQyOjE5IFBNOyAyNTg1"/>
        <attribute name="edited" value="RGFtaWFuOyBEQU1JQU4tUEM7IDIwMTctMDMtMDQ7IDA4OjQ1OjE2IFBNOyAyNTg1"/>
    </attributes>
    <function name="Main" type="None" variable="">
        <parameters/>
        <body>
            <declare name="word" type="String" array="False" size="" variables="word"/>
            <declare name="encrypted" type="String" array="False" size="" variables="encrypted"/>
            <assign variable="encrypted" expression="&quot;&quot;"/>
            <declare name="i" type="Integer" array="False" size="" variables="i"/>
            <declare name="key" type="Integer" array="False" size="" variables="key"/>
            <output expression="&quot;Enter Key&quot;"/>
            <input variable="key"/>
            <declare name="letter" type="Integer" array="False" size="" variables="letter"/>
            <output expression="&quot;Enter Word&quot;"/>
            <input variable="word"/>
            <for variable="i" start="0" end="len(word)-1&#13;&#10;" direction="inc" step="1">
                <assign variable="letter" expression="ToCode(char(word,i))"/>
                <if expression="letter = 32">
                    <then>
                        <assign variable="encrypted" expression="encrypted&amp;&quot; &quot;"/>
                    </then>
                    <else>
                        <assign variable="letter" expression="letter - key"/>
                        <if expression="letter &lt;65">
                            <then>
                                <assign variable="letter" expression="letter + 26"/>
                            </then>
                            <else/>
                        </if>
                        <assign variable="encrypted" expression="encrypted&amp;ToChar(letter)"/>
                    </else>
                </if>
            </for>
            <output expression="encrypted"/>
        </body>
    </function>
</flowgorithm>
