June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
17
Task/Munching-squares/AWK/munching-squares.awk
Normal file
17
Task/Munching-squares/AWK/munching-squares.awk
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
BEGIN {
|
||||
# square size
|
||||
s = 256
|
||||
# the PPM image header needs 3 lines:
|
||||
# P3
|
||||
# width height
|
||||
# max colors number (per channel)
|
||||
print("P3\n", s, s, "\n", s - 1)
|
||||
# and now we generate pixels as a RGB pair in a relaxed
|
||||
# form "R G B\n"
|
||||
for (x = 0; x < s; x++) {
|
||||
for (y = 0; y < s; y++) {
|
||||
p = xor(x, y)
|
||||
print(0, p, p)
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue