Question: IN C Programming Create two constants to be used to set the sizes of two arrays with values of 10 and 26, e.g., #define PRICE_SIZE
IN C Programming
- Create two constants to be used to set the sizes of two arrays with values of 10 and 26, e.g., #define PRICE_SIZE 10.
- Create an array to store 10 prices and initialize all the values to zeros, appropriately, e.g., double price[...] = {0}; where the ellipse is the appropriate constant from step 2.
- Create an array to hold 26 characters and initialize all the values to zeros; see step 3 adjusting it appropriate for the English alphabet.
- Create a typical for loop for processing an entire array, which ask for and stores 10 prices into the first array, e.g., for (i = 0; i < ...; i++) {...}, where the first ellipse is the appropriate constant from step 2 and the second ellipse is the code needed inside the loop to get 10 prices from the user.
- Create a typical for loop, which ask for and stores the English alphabet; see step 5 adjusting things appropriately.
- Create a typical for loop, which displays the 10 prices using the indices, complete sentences, and lined up on the decimal points, e.g., Price 1 is $ 10.69; see step 5 adjusting the code inside the loop appropriately. Hint: You will need 8 columns for the second format specifier to line up the decimal points. This will allow for the largest number to be 99999.99.
- Create a typical for loop, which displays the entire alphabet using the indices and complete sentences, e.g., Letter 1 is A; see step 5 adjusting the code inside the loop appropriately.
- Make sure your output looks professional, e.g., put a blank line between getting the input and display the results, i.e., between the different parts of the output.
- Make sure your comments and code completely follow the Code Conventions; if you are not sure how to do something, e.g., label or space out your code, search and use the previous solutions, etc., and Q & A to get your questions answered.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
