Answer:
I've implemented this program using python
userinput = int(input("Length: "))
mylist = []
mylist.append(userinput)
for i in range(1,userinput+1):
userinp = int(input("Input: "))
mylist.append(userinp)
smallval = mylist[1]
for i in range(1,len(mylist)):
if smallval > mylist[i]:
smallval = mylist[i]
for i in range(1,len(mylist)):
mylist[i] = mylist[i] - smallval
for i in range(1,len(mylist)):
print(mylist[i],end=' ')
Explanation:
I've added the full source program as an attachment where I used comments to explain difficult lines
hi
Counting a sequence of statements without any decisions or branches as one control structure (as many computer scientists do),the if, if-else, and if-else-if ladders as one control structure,the three types of loops (while, do-while, and for) as three different control structures,the break and continue statements, in the context of loops, as one more (although this can be debatable),the switch/case control structure as one,the call/return mechanism as one,the ability to specify and call a callback function as one,the goto/label as one,and the setjmp/longjmp non-local goto as one,