I am using for loops to get a pattern printed I have one for loop for my rows and then seven for loops to print 4 triangles and three blank spaces. I can print all my triangles and my space but I am having trouble getting my 3 tri mirror my 2nd and my 4 tri mirror my frirst. I am printing out of "*". Yes this is an assignment. I don't want the code maybe just a good hint; Thank you Ryan Perlman Bend,Or
Start by doing everything by hand, then look for a pattern. When you find a pattern, figure out a way of automating the progression in a loop. Your pattern goes something like this: * (x1) _ (x5) * (x5) _ (x1) * (x5) _ (x5) * (x1) * (x2) _ (x4) * (x4) _ (x2) * (x4) _ (x4) * (x2) * (x3) _ (x3) * (x3) _ (x3) * (x3) _ (x3) * (x3) * (x4) _ (x2) * (x2) _ (x4) * (x2) _ (x2) * (x4) * (x5) _ (x1) * (x1) _ (x5) * (x1) _ (x1) * (x5) Now that you can see the progression a little better, figure out what kind of calculations you need in your loop.
Thanks to all the reason I didn't write a method is because technically I don't know how yet it is the next chapter in the book. I was spose to write this using the for loop and System.out.print(' '); Here was my actual question modify exercise 5.10 into a single application that prints all four patterns side by side making clever use of nested for loops 5.10 write an app that displays the following patterns separately one below the other. use for loops to generate the patterns. They should be printed by a single statement of the form System.out.print('*'); and System.out.print(' '); the last two patterns require that each line begin with an appropriate number of blank spaces. (That is what was killing me); I did get it and I won't post it. since I have noticed This same and similar question here before.
Perservere and you shall succeed!!! Ryan Perlman Bend, Oregon