Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Types of cultural maps ?

Answered: 1 week ago

Question

Discuss the various types of leasing.

Answered: 1 week ago

Question

Define the term "Leasing"

Answered: 1 week ago

Question

What do you mean by Dividend ?

Answered: 1 week ago

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago