This week you will apply what you learned in analyzing for


This week, you will apply what you learned in analyzing forwhile, and do-while loops by writing these statements yourself. The JavaTM program you write should do the following:

  • Display a pyramid of asterisks onscreen (i.e., a nested for loop)
  • Display the integers 10 to 1 in decreasing order, one number per line (i.e., a while/do-whlie loop)
  • Add 7 until the sum becomes greater than 157, at which point the program should display both the sum and the number of 7s added

Complete this assignment by doing the following:

  1. Download and unzip the linked Week Three Coding Assigment Zip File.
  2. Add comments to the code by typing your name and the date in the multi-line comment header.
  3. Replace the following lines with JavaTM code as directed in the file:
  • LINE 1
  • LINE 2
  • LINE 3
  1. Comment each line of code you add to explain what you intend the code to do and why you chose each type of loop.
  2. Test and modify your JavaTM program until it runs without errors and produces the results as described above.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: This week you will apply what you learned in analyzing for
Reference No:- TGS02741728

Now Priced at $10 (50% Discount)

Recommended (96%)

Rated (4.8/5)