This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsigned int Bin_to_Gray(unsigned int b) { | |
return b ^ (b >> 1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IDENTIFICATION DIVISION. | |
PROGRAM-ID. HELLOMARS. | |
PROCEDURE DIVISION. | |
DISPLAY 'HELLO, MARS!'. | |
STOP RUN. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsigned int Gray_To_Bin(unsigned int g) { | |
num = g ^ (g >> 32); | |
num = g ^ (g >> 16); | |
num = g ^ (g >> 8); | |
num = g ^ (g >> 4); | |
num = g ^ (g >> 2); | |
num = g ^ (g >> 1); | |
return g; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
print 'Fibonacci number: '; | |
for $*IN.get { | |
my @fib = 1, 1, *+* ... *; | |
say "Fibonacci number #$_ is @fib[$_-1]"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
say 'Ackermann function: A(m,n)'; | |
print 'Enter m = '; | |
my $M = $*IN.get; | |
print 'Enter n = '; | |
my $N = $*IN.get; | |
sub A($m, $n) { | |
$m == 0 ?? $n + 1 !! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
my @array = (0, 1, 1, 2, 3, 5, 8, 13); | |
for @array -> $x { | |
say $x; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ПРОЦ СТАРТ() | |
ВЫВОД: 'Привет, Марс!' | |
КОН ПРОЦ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.txt_output equ &bb5a | |
.print_hex_byte | |
push af | |
rrca | |
rrca | |
rrca | |
rrca | |
call print_byte_digit | |
pop af |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TITLE "Generate by Resolve" | |
LUT_3D_SIZE 33 | |
0.0000000000 0.0000000000 0.0000000000 | |
0.0039220000 0.0000000000 0.0039220000 | |
0.0117650000 0.0000000000 0.0039220000 | |
0.0196080000 0.0039220000 0.0078430000 | |
0.0274510000 0.0078430000 0.0078430000 | |
0.0352940000 0.0156860000 0.0078430000 | |
0.0431370000 0.0196080000 0.0117650000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TITLE "Generate by Resolve" | |
LUT_3D_SIZE 33 | |
0.0000000000 0.0000000000 0.0117650000 | |
0.0039220000 0.0000000000 0.0117650000 | |
0.0078430000 0.0000000000 0.0117650000 | |
0.0156860000 0.0039220000 0.0156860000 | |
0.0196080000 0.0078430000 0.0156860000 | |
0.0274510000 0.0117650000 0.0156860000 | |
0.0352940000 0.0156860000 0.0156860000 |
OlderNewer