Count in octal: Difference between revisions

Line 1,382:
 
=={{header|FutureBasic}}==
<lang futurebasic>window 1, @"Count in Octal"
include "ConsoleWindow
defstr word
 
defstr word
dim as short i
text ,,,,, 50
 
print @"dec",@"oct"
for i = &o000000 to &o000031 // 0 to 25 in decimal
for i = 0 to 25
print oct$(i); " in octal ="; i
print i,oct(i)
next
 
</lang>
HandleEvents</lang>
 
Output:
<pre>dec oct
0 00
000000 in octal = 0
1 01
000001 in octal = 1
2 02
000002 in octal = 2
3 03
000003 in octal = 3
4 04
000004 in octal = 4
5 05
000005 in octal = 5
6 06
000006 in octal = 6
7 07
000007 in octal = 7
8 10
000010 in octal = 8
9 11
000011 in octal = 9
10 12
000012 in octal = 10
11 13
000013 in octal = 11
12 14
000014 in octal = 12
13 15
000015 in octal = 13
14 16
000016 in octal = 14
15 17
000017 in octal = 15
16 20
000020 in octal = 16
17 21
000021 in octal = 17
18 22
000022 in octal = 18
19 23
000023 in octal = 19
20 24
000024 in octal = 20
21 25
000025 in octal = 21
22 26
000026 in octal = 22
23 27
000027 in octal = 23
24 30
000030 in octal = 24
25 31</pre>
000031 in octal = 25
</pre>
 
=={{header|Go}}==
416

edits