3 Replies - 1250 Views - Last Post: 15 January 2013 - 09:11 AM Rate Topic: -----

#1 ragefour  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 15-January 13

diamond pattern using string manipulation

Posted 15 January 2013 - 07:27 AM

i can make diamond using this code
    a = Mid("awesome", 4, 1)
    Print Space(20); a
    a = Mid("awesome", 3, 3)
    Print Space(18); a
    a = Mid("awesome", 2, 5)
    Print Space(16); a
    a = Mid("awesome", 1, 7)
    Print Space(14); a
    a = Mid("awesome", 2, 5)
    Print Space(16); a
    a = Mid("awesome", 3, 3)
    Print Space(18); a
    a = Mid("awesome", 4, 1)
    Print Space(20); a



I want to make it in a loop, but i can't figure out hot to.
anyone can give me ideas?

Is This A Good Question/Topic? 0
  • +

Replies To: diamond pattern using string manipulation

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8893
  • View blog
  • Posts: 33,351
  • Joined: 12-June 08

Re: diamond pattern using string manipulation

Posted 15 January 2013 - 07:49 AM

For loop.. do while.. while loop.. they are all pretty standard and straight forward.
Was This Post Helpful? 0
  • +
  • -

#3 ragefour  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 15-January 13

Re: diamond pattern using string manipulation

Posted 15 January 2013 - 08:28 AM

thanks for the reply.
And yeah i tried that, but i keep on getting wrong outputs.
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8893
  • View blog
  • Posts: 33,351
  • Joined: 12-June 08

Re: diamond pattern using string manipulation

Posted 15 January 2013 - 09:11 AM

Show us what you tried then... and 'wrong results' -> how?!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1