# sqfile2.py
# Written by Todd Wareham for CS 2500
"""
Given the name of a file of integers (with zero or more integers per line)
 as a command-line argument, prints the squares of all integers in that file.
"""

import sys

if len(sys.argv) != 2:
    print "usage: python", sys.argv[0], "filename"
    sys.exit(1)

for line in file(sys.argv[1]):
    for x in line.split():
        print "The square of ", int(x), " is ", int(x) * int(x)
