Construct a program that first prints out 15, then 14, then 12, then 9 and finally 5 on consecutive lines.
arranging these given lines:
Short Summary:
Provided the source code and sample output as per the requirements.
Source Code:
MAX = 5
i = 0
while i < MAX:
sum = 0
j = MAX
while j > i:
sum = sum + j
j = j - 1
print(sum)
i = i + 1
Refer the following screenshots for code indentation:
Sample Run:
**************************************************************************************
Feel free to rate the answer and comment your questions, if you have any.
Please upvote the answer and appreciate our time.
Happy Studying!!!
**************************************************************************************
Get Answers For Free
Most questions answered within 1 hours.