Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners > Writing side of...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 11029 of 11065
Post > Topic >>

Writing side of square

by digolinopage@[EMAIL PROTECTED] (Rodrigo Tavares) May 5, 2008 at 06:22 AM

Hello,

I need create a square using a single number, but I don't know how to
creat=
e the sides.

I have to create this:

****
*  *
*  *=20
****

My code is below :

print "Enter with number:";
chomp ($number =3D <STDIN>);

my @[EMAIL PROTECTED]
 =3D ();

$cont =3D 0;

while ($numero > $cont)
 {
 =09$array[$cont]=3D"*";
 =09$cont++;
 }
=20
 print @[EMAIL PROTECTED]
 print "\n";
 print @[EMAIL PROTECTED]
 print "\n";
 =20
How I can to show the arrar like sides ?

[]'s

Faria=0A=0A=0A      Abra sua conta no Yahoo! Mail, o =FAnico sem limite de
=
espa=E7o para armazenamento!=0Ahttp://br.mail.yahoo.com/




 4 Posts in Topic:
Writing side of square
digolinopage@[EMAIL PROTE  2008-05-05 06:22:51 
Re: Writing side of square
rob.dixon@[EMAIL PROTECTE  2008-05-05 15:33:03 
Re: Writing side of square
kratzers@[EMAIL PROTECTED  2008-05-05 11:18:08 
Re: Writing side of square
chas.owens@[EMAIL PROTECT  2008-05-05 17:18:13 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue May 13 21:37:07 CDT 2008.