Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a C program please help ASAP! Thanks! Open the Algorithmic Design Document, make a copy, and follow the steps to create your algorithm. ]
Write a C program please help ASAP! Thanks!
Open the Algorithmic Design Document, make a copy, and follow the steps to create your algorithm. ] You must express your algorithm as pseudocode or a flowchart. Prompt the user to input five pairs of numbers: A Stock's ID number (099) and the Stock's price (>0). - Store the stock ID number in an int array and the price in a double array. Output these arrays (i.e., output the list). - Once you have this working, follow the steps below to implement the menu driven program. (See sample run below for final product). Implement a menu of options for a user to modify the list. Each option is represented by a single character. MENU u - Update stock price a - Output Stocks above a price - Output Stock list with ID numbers and price q - Quit Choose an option: The program initially outputs the menu, and repeats the menu after a user chooses an option. If the user enters ' u ', implement the "Update stock price" menu option. Prompt the user for a stock ID number. Prompt again for a new price for the stock, and then change that stock's price. (Hint: Use a for loop, find the stock ID number that the user enters, and change the corresponding price). the user for a price. Print the stock ID number and price for all stocks with price above the entered value. If the user enters 'o', implement the "Output Stock list with ID numbers and price" menu option. The program ends when the user chooses the option to Quit. ] Menu option characters should be case insensitive - must work for both uppercase and lowercase. - Test your program using the following sample runs, making sure you get the same output when using the given inputs (in blue): Welcome to the Stock Portfolio Program! Enter Stock ID number: 84 Enter stock Price $: 120.65 Enter Stock ID number: 18 Enter Stock Price $: 20.50 Enter Stock ID number: 20 Enter Stock Price $: 685.70 Enter Stock ID number: 44 Enter Stock Price $: 3120.65 Enter Stock ID number: 24 Enter Stock Price $: 2611.28 Stock List Stock 1 -- ID number: 84, Price: 120.65 Stock 2 ID number: 18, Price: 20.50 Stock 3 -- ID number: 20 Price: 685.70 Stock 4 -- ID number: 44, Price: 3120.65 MENU u - Update stock price a - Output stocks above a price - Output stock list with ID numbers and price q - Quit Choose an option: g Invalid option! Please try again!! MENU u - Update stock price a - Output stocks above a price - Output stock list with ID numbers and price q - Quit Choose an option: q Thank you for using my stock Portfolio ProgramStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started