-
Notifications
You must be signed in to change notification settings - Fork 0
/
swapping_numbers.fprg
27 lines (27 loc) · 1.51 KB
/
swapping_numbers.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
26
27
<?xml version="1.0"?>
<flowgorithm fileversion="3.0">
<attributes>
<attribute name="name" value=""/>
<attribute name="authors" value="CB.EN.U4CYS22027"/>
<attribute name="about" value=""/>
<attribute name="saved" value="2022-11-04 11:17:23 AM"/>
<attribute name="created" value="Q0IuRU4uVTRDWVMyMjAyNzsyMDIyMjNNQVlDMDA2NDsyMDIyLTExLTA0OzEwOjA0OjQ0IEFNOzMwNTQ="/>
<attribute name="edited" value="Q0IuRU4uVTRDWVMyMjAyNzsyMDIyMjNNQVlDMDA2NDsyMDIyLTExLTA0OzExOjE3OjIzIEFNOzQ7MzE2Nw=="/>
</attributes>
<function name="Main" type="None" variable="">
<parameters/>
<body>
<declare name="a, b" type="Integer" array="False" size=""/>
<output expression=""enter your first number "" newline="True"/>
<input variable="a"/>
<output expression=""enter your second number "" newline="True"/>
<input variable="b"/>
<assign variable="a" expression="a+b"/>
<comment text="we assign a=a+b after assigning we turn b= a-b which is b= a+b-b turning b=a "/>
<assign variable="b" expression="a-b"/>
<comment text="a= a-b which means a= a+b-a therefore a becomes b"/>
<assign variable="a" expression="a-b"/>
<output expression=""after swapping your first number is " &a& "your second number is " & b" newline="True"/>
</body>
</function>
</flowgorithm>