-
Notifications
You must be signed in to change notification settings - Fork 0
/
23-İkilik Sistemde Sayının Değerini Hesaplama.fprg
28 lines (28 loc) · 1.48 KB
/
23-İkilik Sistemde Sayının Değerini Hesaplama.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
28
<?xml version="1.0"?>
<flowgorithm fileversion="3.0">
<attributes>
<attribute name="name" value=""/>
<attribute name="authors" value="husey"/>
<attribute name="about" value=""/>
<attribute name="saved" value="2023-08-24 12:38:02 ÖS"/>
<attribute name="created" value="aHVzZXk7SMWhU0VZSU47MjAyMy0wOC0yNDsxMjoyNjowNSDDllM7Mjc5Ng=="/>
<attribute name="edited" value="aHVzZXk7SMWhU0VZSU47MjAyMy0wOC0yNDsxMjozODowMiDDllM7MTsyOTA0"/>
</attributes>
<function name="Main" type="None" variable="">
<parameters/>
<body>
<declare name="sayi, kalan" type="Integer" array="False" size=""/>
<declare name="ikiSayiTabani" type="String" array="False" size=""/>
<output expression=""Lütfen iki tabanında hesaplanmasını istediğini zdeğeri giriniz."" newline="True"/>
<input variable="sayi"/>
<assign variable="ikiSayiTabani" expression=""""/>
<while expression="sayi > 1">
<assign variable="kalan" expression="sayi % 2"/>
<assign variable="sayi" expression="int(sayi / 2)"/>
<assign variable="ikiSayiTabani" expression="kalan & ikiSayiTabani"/>
</while>
<assign variable="ikiSayiTabani" expression=""1" & ikiSayiTabani"/>
<output expression="ikiSayiTabani" newline="True"/>
</body>
</function>
</flowgorithm>