-
Notifications
You must be signed in to change notification settings - Fork 0
/
Reversing a number.fprg
25 lines (25 loc) · 1.2 KB
/
Reversing a number.fprg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?xml version="1.0"?>
<flowgorithm fileversion="3.0">
<attributes>
<attribute name="name" value=""/>
<attribute name="authors" value="Aloukik"/>
<attribute name="about" value=""/>
<attribute name="saved" value="2023-03-21 04:39:05 PM"/>
<attribute name="created" value="QWxvdWtpaztTVEFSVExFUjsyMDIzLTAzLTIxOzA0OjI4OjU3IFBNOzI2Mjg="/>
<attribute name="edited" value="QWxvdWtpaztTVEFSVExFUjsyMDIzLTAzLTIxOzA0OjM5OjA1IFBNOzE7MjczMQ=="/>
</attributes>
<function name="Main" type="None" variable="">
<parameters/>
<body>
<declare name="number, reverse" type="Integer" array="False" size=""/>
<output expression=""Enter the number to be reverse."" newline="True"/>
<input variable="number"/>
<assign variable="reverse" expression="0"/>
<while expression="number>=1">
<assign variable="reverse" expression="(reverse*10)+(number%10)"/>
<assign variable="number" expression="number/10"/>
</while>
<output expression=""The reverse of the number is "&reverse" newline="True"/>
</body>
</function>
</flowgorithm>