1) Write an algorithm that describes the second part of the process of making ch
ID: 3757458 • Letter: 1
Question
1) Write an algorithm that describes the second part of the process of making change (counting out the coins and bills).
2) Write an algorithm that describes a common task, such as baking a cake or operating a DVD player.
Please answer all of them I reallv need it 1) Write an algorithm that describes the second part of the process of making change (counting out the coins and bills). 2) Write an algorithm that describes a common task, such as baking a cake or operating a DVD player. 3) Describe an instruction that is not well defined and thus could not be included as a step in an algorithm. Give an example of such an instruction.Explanation / Answer
For question 1, for the process of making change,we will make changes for quarter, dime, nickel, and penny, Algorithm goes like this.
START
Step 1: Take the whole amount and take variables for quarter, dime ,nickel and penny and initialize them to zero.
Step 2: if wholeamount>=25 divide it by 25 and add 1 to quarter. Repeat until it is false.
Step 3: if wholeamount>=10 divide it by 10 and add 1 to dime. Repeat it until false.
Step 4: if wholeamount>=5 divide it by 5 and add 1 to nickel. Repeat it until false.
Step 5: add wholeamount to penny.
Step 6: No of quarter ,dime, nickel and penny shows the changes
END
2) Baking a Cake:
START
step 1: Heat oven to 325 .F
step 2: Gather the ingredients
step3: Mix the ingredients carefully in the bowl.
step 4:Pour the mixture into the baking pan.
step 5:Bake in the oven for 50 mins
step 6: Repeat bake 5 for minutes until cake top springs back when touched in the centre.
step 7: Cool on the rack before cutting.
END
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.