Upload files to "/"
This commit is contained in:
32
balikAngka.fprg
Normal file
32
balikAngka.fprg
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0"?>
|
||||
<flowgorithm fileversion="4.2">
|
||||
<attributes>
|
||||
<attribute name="name" value="balikAngka"/>
|
||||
<attribute name="authors" value="yuvlian"/>
|
||||
<attribute name="about" value=""/>
|
||||
<attribute name="saved" value="2026-02-12 09:12:50 AM"/>
|
||||
<attribute name="created" value="eXV2bGlhbjtQQU5DQUtFOzIwMjYtMDItMTI7MDc6MzE6MzEgQU07MjUzNA=="/>
|
||||
<attribute name="edited" value="eXV2bGlhbjtQQU5DQUtFOzIwMjYtMDItMTI7MDk6MTI6NTAgQU07NjsyNjQ5"/>
|
||||
</attributes>
|
||||
<function name="Main" type="None" variable="">
|
||||
<parameters/>
|
||||
<body>
|
||||
<output expression=""masukkan angka yg ingin dibalik"" newline="True"/>
|
||||
<declare name="angkaUtkDibalik" type="Integer" array="False" size=""/>
|
||||
<input variable="angkaUtkDibalik"/>
|
||||
<declare name="angkaTerbalik" type="Integer" array="False" size=""/>
|
||||
<declare name="digit" type="Integer" array="False" size=""/>
|
||||
<assign variable="angkaTerbalik" expression="0"/>
|
||||
<comment text="cara lebih gampang sbnrnya tinggal conv ke string, trs reverse, parse ke int"/>
|
||||
<comment text="tp ini lbh proper krn ga alloc string :3"/>
|
||||
<while expression="angkaUtkDibalik != 0">
|
||||
<comment text="sbnrnya kurang suka mut by default, enakan immutable by default, i <3 rust"/>
|
||||
<comment text="dan di C agak lucu, udah const pun masih bisa diubah w/ ptr hax"/>
|
||||
<assign variable="digit" expression="angkaUtkDibalik % 10"/>
|
||||
<assign variable="angkaTerbalik" expression="angkaTerbalik * 10 + digit"/>
|
||||
<assign variable="angkaUtkDibalik" expression="angkaUtkDibalik / 10"/>
|
||||
</while>
|
||||
<output expression=""angka terbalik: " & angkaTerbalik" newline="True"/>
|
||||
</body>
|
||||
</function>
|
||||
</flowgorithm>
|
||||
Reference in New Issue
Block a user