You have a product that is on sale. Each day of the sale, the price drops 10% from its previous price. The sale lasts for 4 days. I have to write a program that processes this problem using a loop. Each pass through the loop should generate the sale price for a a day of the sale and display that price along with the day number.
Which loop would I use ? I cannot seem to figure this out.
You should be aware that Java and Javascript are entirely different programming languages, in spite of the confusingly similar names. Rather like Austria and Australia!
__________________
All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.