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
In reply to Re: Beginner question
by EmmittSmith
in thread Need help printing rectangle of asterisks (was: Beginner question)
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |