Question: 1) Using enclosed file Introductory21.cpp. The program should calculate the average stock price stored in the prices array. It then should display the average price

1) Using enclosed file Introductory21.cpp. The program should calculate the average stock price stored in the prices array. It then should display the average price on the screen. Complete the program using the for statement. Run the program screen-shot your solution and upload both your results and code.

//Introductory21.cpp - Displays the average stock price //Created/revised by  on  #include  #include  using namespace std; int main() { double prices[10] = {96.5, 100.5, 100.5, 100.5, 99, 99, 99, 100, 98.5, 98.9}; double total = 0.0; double average = 0.0; cout << fixed << setprecision(2); cout << "Average stock price: $" << average << endl; return 0; } //end of main function 

2)In this exercise, you create a program that generates and displays six unique random integers for a lottery game. Each lottery number can range from 1 through 54 only. Create a program that generates six unique random integers from 1 through 54 and then displays the integers on the screen, then run the program and take a screen-shoot of your results and include it with your code

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!