Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write in C++ please. I could really use the extra credit so if you could implement functions for the entire program I would greatly appreciate

Write in C++ please. I could really use the extra credit so if you could implement functions for the entire program I would greatly appreciate it.

For this lab, you will need to implement each of the steps below. It is your choice whether you use functions or not, however, each of the steps below must be implemented properly and your code must compile and run. Students who implement functions for the entire program will receive extra credit. You must also put a comment that indicates which step you are implementing above the code: //Step7

Step 2: Enter the skeleton code into your source file.

#include

#include

using namespace std;

int main(){

system("pause");

return 0;

}

Step 3: Type in the code to declare and initialize an array called qArray that has the following values:

3.7

12.3

4.5

10.6

2.3

5.4

9.8

15.2

7.7

19.8

qArray

Step 4: Change the value of the third component in the array to 75.6

Step 5: Print out all of the elements in the array on screen.

Step 6: Change all values under 10.5 to 7.6 using a loop and an if statement.

Step 7: Print out all of the elements in the array on screen.

Step 8: Calculate the sum of all the components and print the sum on screen with an appropriate message.

Step 9: Prints the even numbers in the array and how many even numbers there are with an appropriate message [Hint: How can you determine if a number is even? What is true about all even numbers when compared to uneven numbers? (Hint, hint: think remainders)]

Step 10: Allow the user to change each of the values in the array; Prompt the user to "Enter a value:" and store the value in the array for each component.

Step 11: Print out all of the elements in the array on the screen.

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

Recommended Textbook for

Information Modeling And Relational Databases

Authors: Terry Halpin, Tony Morgan

2nd Edition

0123735688, 978-0123735683

More Books

Students also viewed these Databases questions

Question

Question Can any type of stock or securities be used in an ESOP?

Answered: 1 week ago

Question

Question Can a self-employed person adopt a money purchase plan?

Answered: 1 week ago