#!/usr/bin/env ruby

# Dustin McCormick 
# Ruby 1.8.5  (platform independent)
# CS 124, Fall 2006

puts "Please enter the requested information about the two matrices you wish to multiply:"

counter = 0
4.times do
  counter += 1
  rows_or_columns = counter % 2 != 0 ? 'rows' : 'columns'
  first_or_second = counter < 3 ? 'first' : 'second'

  print "Please enter the #{rows_or_columns} in the #{first_or_second} matrix: "
  input = gets.chomp.to_i

  @dimensions << {first_or_second => {rows_or_columns => input}}

  puts
  puts if counter == 2 || counter == 4
end

puts @dimensions.to_s