Miscellaneous > Programming & Networking
Re: Let's play a game, pals.
TheQuirk:
I figured that no one cared for this thread. It seems that I was incorrect. Next challenge:
Fill an n by n array in the following manner:
For example, suppose that n = 3. Your program should create the following array:
[[1 2 3]
[8 9 4]
[7 6 5]]
solemnwarning:
--- Code: ---#!/usr/bin/perl
print "n? ";
$n = ;
chomp($n);
if($n == "3") {
open(TEMP, ">/tmp/array");
print TEMP "1 2 3\n";
print TEMP "8 9 4\n";
print TEMP "7 6 5";
close(TEMP);
open(TEMP, "
KernelPanic:
--- Quote from: solemnwarning ---
is this what you mean?
--- End quote ---
:rolleyes:
worker201:
for any positive integer x,
x + (x+1) = (x+1)^2 - x^2
example:
6 + 7 = 49 - 36
try it, it works.
I made this up all by myself.
worker201:
I don't understand how to navigate through the square maze :(
Making an array is easy enough, I guess. But I don't see the pattern in the circular motion.
Navigation
[0] Message Index
[#] Next page
Go to full version