Explore BrainMass

How do you enhance the pseudocode by using arrays and loops?

Enhance the pseudocode in the attachment by using arrays and loops. Also, instead of hardcoding the product names within the program, ask the user to enter the product names in addition to the prices. You can use char array products[5][40] and float array prices[5] to store the names and prices respectively (use "char products[6][40]" and "float prices[6]" if you want to simplify the code at the expense of a few more bytes of memory). Feel free to define additional arrays if needed.


Solution Preview

See the attached document for a properly formatted solution.

define char products[5], float price[5]
initialize i to 0
while (i < 5) do
prompt the user to enter product name
read product name into product[i]
prompt the user to enter the price for ...

Solution Summary

This solution provides guidelines for enhancing a pseudocode using arrays and loops.