0

How would I write the pseudocode for this?

I created what will go into my flow chart but I am a little confuse in the wording needed please help. Start Do you like coffee? Answer No= sit down Answer yes= fill coffee machine with water Add coffee filter and grounds and close lid Place pot on burner and turn on Get Mug from Cabinet Do you like cream or not? Answer Yes Get cream and add to likeness Return cream to fridge Do you want sugar? Answer yes Get sugar from cabinet and add amount to likeness Return sugar to cabinet Now coffee is finished making Pour coffee in mug and stir Drink coffee Stop

13th Nov 2019, 8:47 PM
amill stacks
amill stacks - avatar
1 Réponse
0
I think there is no big difference in pseudocode and flowchart.. Its representation is different so you can use same words in both, its fine only, with just make some difference.. It may like this but not sure, Boolean coffee; If Coffee==false Return 0 Else CoffeeMachine() { Add water Add filter Add grounds Print(description steps) } Mug() { Add cream if yes Add sugar if yes Print(description steps) } Return coffee; Set Coffee=false; It may not perfect, but Hoping it will give you some idea..
13th Nov 2019, 9:31 PM
Jayakrishna 🇮🇳