0
mrunalini's Avatar, Join Date: Aug 2009
Light Poster
it was specified in Q? 2 use while loop thts why i hav solved using while loop.
i'll be thankful 2 u if i get some practice pattern.
Have a nice day
0
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
Well, mayjune gave you one, you can come up with others; here are a few:
Code:
*
 **
  ***
   ****


*   *
 * *
  *
 * *
*   *

***
 ***
  ***
   ***


   ***
  ***
 ***
***

* * ** *** ***** ******** *************

***.* **** * ***** ********* ** ****** ***** *** ******
0
mayjune's Avatar, Join Date: Jun 2009
Invasive contributor
nice one's xp...try these if you need more let us know...it'll polish your thinking in tems of programming...
0
BMuas's Avatar, Join Date: Mar 2011
Newbie Member
Hello all,

I get how to do the
*
**
***
and the
***
**
*

but how do you do the
***
**
*
and
*
**
***
0
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
What, you can work out how to loop from 1-3 then 3-1, but you can't work out how to loop from 3-1 then 1-3??? (hint: IT'S THE OTHER WAY ROUND).
0
BMuas's Avatar, Join Date: Mar 2011
Newbie Member
oh sorry about that. the formating wasnt correct ...seems like we cant add spacing.

like i said, i dont understand how to do it the mirror (opposite of right angle)
......***
........**
..........*

and dont know this too
........*
......**
....***
0
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
OK, so how many spaces are there, and how many stars?
Can you work out how to do a loop to each number, and NOT display a line feed between them?

These pattern programs are really easy to do. Have a go and see how far you get. Don't just give up cos it takes more than three lines of code and a spot of head scratching.
0
BMuas's Avatar, Join Date: Mar 2011
Newbie Member
oh so sorry for the late response, I got it done already...
We went over it in class as notes. Helps with studying in our new chapter and assignments.
0
<Dritf3r>'s Avatar, Join Date: May 2011
Newbie Member
What people need to realize is, these forums are not to obtain answers for homework exercises. To master programming, you need to show initiative and be dedicated. Yes, we all get stuck every now and again, but we don't just put up a post asking for an entire answer. We go to fellow programmers with chunks of code to show our progress. So to all fellow programmers and coders, SHOW INITIATIVE! practice makes perfect! . There are numerous programming resources out there. Use them!

Just remember one thing, you will learn the right way through the hard way.

Regards
<Drift3r>