Hartismere School

Est. 1451. An outstanding coeducational secondary school & sixth form college and England's first academy

Coronavirus (COVID-19)

Programming: C# End of Sequence Task

So far you have been learning about using variables, outputting text and using inputs from the console. All of the code we have done so far have been examples of sequence, code that is executed (run) one line after another until completed. To assess how much you have remembered and learnt, I would like you to create a program that solves the problem below.

Smoothie recipe

Create a program that will allow the user to enter a smoothie name, the main ingredient, quantity of that ingredient needed for one person and then state how many people they are creating the smoothie for. The program should then calculate a new quantity for the number of people and output the ingredient with updated quantity to the console.


Can you adapt the code so that three ingredients and their quantities can be inputted instead of just one?

Could you update your code so users can enter half values, e.g. 0.5, and the quantities are updated accordingly?

Ensure you have a title of 'Smoothie Recipe' in your C# journal. When your code is finished and works, screen shot it, add it to your journal and underneath explain the purpose of each line.

Use this page to hand in your C# journal progress so far (File, Download As, PDF document).