61 lines
3.2 KiB
XML
61 lines
3.2 KiB
XML
<?xml version="1.0"?>
|
|
<flowgorithm fileversion="4.2">
|
|
<attributes>
|
|
<attribute name="name" value="LoopReplaceHuruf"/>
|
|
<attribute name="authors" value="yuvlian"/>
|
|
<attribute name="about" value=""/>
|
|
<attribute name="saved" value="2026-03-05 09:07:07 AM"/>
|
|
<attribute name="created" value="eXV2bGlhbjtDT1NNT1M7MjAyNi0wMy0wNTswODo1NDoxOCBBTTsyNTE3"/>
|
|
<attribute name="edited" value="eXV2bGlhbjtDT1NNT1M7MjAyNi0wMy0wNTswOTowNzowNyBBTTsxOzI2MjI="/>
|
|
</attributes>
|
|
<function name="Main" type="None" variable="">
|
|
<parameters/>
|
|
<body>
|
|
<output expression=""input kalimat yg ingin diubah"" newline="True"/>
|
|
<declare name="kalimat, diganti, pengganti, temp, temp2" type="String" array="False" size=""/>
|
|
<input variable="kalimat"/>
|
|
<if expression="Len(kalimat) == 0">
|
|
<then>
|
|
<assign variable="temp" expression=""kalimat kosong!""/>
|
|
</then>
|
|
<else>
|
|
<output expression=""input huruf untuk diubah"" newline="True"/>
|
|
<input variable="temp"/>
|
|
<if expression="Len(temp) == 0">
|
|
<then>
|
|
<assign variable="temp" expression=""huruf kosong!""/>
|
|
</then>
|
|
<else>
|
|
<assign variable="diganti" expression="Char(temp, 0)"/>
|
|
<output expression=""input huruf yang akan mengubah"" newline="True"/>
|
|
<input variable="temp"/>
|
|
<if expression="Len(temp) == 0">
|
|
<then>
|
|
<assign variable="temp" expression=""huruf kosong!""/>
|
|
</then>
|
|
<else>
|
|
<assign variable="pengganti" expression="Char(temp, 0)"/>
|
|
<declare name="i" type="Integer" array="False" size=""/>
|
|
<assign variable="temp" expression=""""/>
|
|
<for variable="i" start="0" end="Len(kalimat) - 1" direction="inc" step="1">
|
|
<assign variable="temp2" expression="Char(kalimat, i)"/>
|
|
<if expression="temp2 == diganti">
|
|
<then>
|
|
<assign variable="temp" expression="temp & pengganti"/>
|
|
</then>
|
|
<else>
|
|
<assign variable="temp" expression="temp & temp2"/>
|
|
</else>
|
|
</if>
|
|
</for>
|
|
</else>
|
|
</if>
|
|
</else>
|
|
</if>
|
|
</else>
|
|
</if>
|
|
<output expression="temp" newline="True"/>
|
|
</body>
|
|
</function>
|
|
</flowgorithm>
|