Purchase Solution

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

Not what you're looking for?

Ask Custom Question

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.

Attachments
Purchase this Solution

Solution Summary

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

Solution Preview

See the attached document for a properly formatted solution.

main():
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 ...

Purchase this Solution


Free BrainMass Quizzes
Javscript Basics

Quiz on basics of javascript programming language.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.