Skip to content

Instantly share code, notes, and snippets.

@tbuehlmann
Forked from anonymous/gist:5273156
Last active December 15, 2015 14:18
Show Gist options
  • Save tbuehlmann/5273181 to your computer and use it in GitHub Desktop.
Save tbuehlmann/5273181 to your computer and use it in GitHub Desktop.
class gridtest1
{
public static void main (String[] args)
{
int i=0,j=0,grid=10;
while(i<=grid)
{
while(j<=grid)
{
System.out.println("("+i+","+j+")");
j=j+1;
}
i=i+1;
j=0;
}
}
}
I = 0
J = 0
GRID = 10
I.upto(GRID) do |i|
J.upto(GRID) do |j|
puts "(#{i},#{j})"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment