![]() ![]() I hope this helps anyone needing a little push in the right direction. I also made the indentation a little easier to read. Below is the code I used to pass 100%, and I will comment on the areas that needed to be modified. The above code marked solved is right but there are a few things that are off in the code that I thought I would clarify for everyone. I know this is a bit late but I am going through this same challenge on zybooks (which happens to be a lab activity). This method allows the user to input any size for the arrow (while staying in the value boundaries of an int of course) () //This makes a new line to keep adding more stars for the next row the nested (2nd) for loop it will be one asterisk smaller Click on the motion tab while the overlay option is still selected, and pick the animation effect to your liking. Click on ‘Overlays’ -> select the one you want to animate). TempHeadWidth -= 1 //So we are lowering the tempHeadWidth by one so the next time it enters Loopy Arrow Stencil Echo Park - Wish Upon A Star 2 6圆 item : 588-18229. Select the overlay you want to animate (you can easily get there from the main page of your project. Once the loop above is finished, the rest of the code will execute in the main for-loop and then scheck if it will run again. String ast = "" //String ast will contain how many asterisk we want for the base width įor (int x = 1 x 0 z-) //This loop prints the amount of asterisks we need per line in the arrowHead Download this Premium Vector about Flying cupid holding bow and shooting arrow in hand drawn style, and discover more than 51 Million Professional Graphic. Your code above | Below is the modified code You know this because the user inputs the size of each part of the arrow. Draw arrow base (height = 3, width = 2)Įxample of how the output arrow may look: **įor this problem, you would want to use for-loops since you know the exact number of times it should repeat. What kind of loops should I be using to get the widths correct? Scanner scnr = new Scanner(System.in) My code gets the height of the base right (2), but not the width. When I try to add a while loop as the outer loop, the program times out. So far, I have been able to correctly draw the arrow for input values of I have learned if-else, while loops, and for loops. I am supposed to use a nested loop where the inner loop draws the *s and the outer loop iterates the number of times equal to the height of the arrow base. I am in my first java class, and I am trying to draw a half arrow using asterisks. ![]()
0 Comments
Leave a Reply. |