in reply to Need help printing rectangle of asterisks (was: Beginner question)
This should work:
print "Enter width\n"; chop($ans = <>); print "Enter height\n"; chop($ans2 = <>); for ($j=0;$j < $ans2;$j++) { print "*"x$ans."\n"; }
One thing you had was height and width reversed, it doesn't really matter, but... Anyway this program vertically prints the stars, try it out & tell me what ya think.
-Emmitt
|
|---|