<?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="2019-10-12 04:36:39 PM"/>
        <attribute name="created" value="YnVycmluO0RFU0tUT1AtNzQ5RDJJRjsyMDE5LTEwLTEyOzA0OjE2OjM5IFBNOzI5NDk="/>
        <attribute name="edited" value="YnVycmluO0RFU0tUT1AtNzQ5RDJJRjsyMDE5LTEwLTEyOzA0OjM2OjM5IFBNOzI7MzA2MA=="/>
    </attributes>
    <function name="Main" type="None" variable="">
        <parameters/>
        <body>
            <declare name="MyArray" type="Integer" array="True" size="10"/>
            <declare name="value2find" type="Integer" array="False" size=""/>
            <declare name="x" type="Integer" array="False" size=""/>
            <for variable="x" start="0" end="9" direction="inc" step="1">
                <assign variable="MyArray[x]" expression="random(100)"/>
            </for>
            <output expression="&quot;Enter Value to find&quot;" newline="True"/>
            <input variable="value2find"/>
            <assign variable="x" expression="Lsearch(value2find,MyArray)"/>
            <if expression="x==-1">
                <then>
                    <output expression="value2find &amp; &quot; is not in the array&quot;" newline="True"/>
                </then>
                <else>
                    <output expression="value2find &amp; &quot; is at position &quot; &amp; x" newline="True"/>
                </else>
            </if>
        </body>
    </function>
    <function name="LSearch" type="Integer" variable="position">
        <parameters>
            <parameter name="Number" type="Integer" array="False"/>
            <parameter name="theArray" type="Integer" array="True"/>
        </parameters>
        <body>
            <declare name="position" type="Integer" array="False" size=""/>
            <assign variable="position" expression="-1"/>
            <declare name="counter" type="Integer" array="False" size=""/>
            <for variable="counter" start="0" end="size(theArray)-1" direction="inc" step="1">
                <if expression="theArray[counter] == number">
                    <then>
                        <assign variable="position" expression="counter"/>
                    </then>
                    <else/>
                </if>
            </for>
        </body>
    </function>
</flowgorithm>
