Create a program that allows the user to enter the ages (in years) of five people. The
Question:
Create a program that allows the user to enter the ages (in years) of five people. The program should display the average age. Use the for statement. Display the average age with one decimal place. If necessary, create a new project named TryThis15 Project, and save it in the Cpp8\Chap07 folder. Enter the C++ instructions into a source file named TryThis15.cpp. Also enter appropriate comments and any additional instructions required by the compiler. Test the program using the following ages: 23, 31, 37, 19, and 43.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 73% (15 reviews)
TryThis15cpp displays the average age Createdrevised by on include include using na...View the full answer
Answered By
Hemstone Ouma
"Hi there! My name is Hemstone Ouma and I am a computer scientist with a strong background in hands-on experience skills such as programming, sofware development and testing to name just a few. I have a degree in computer science from Dedan Kimathi University of Technology and a Masters degree from the University of Nairobi in Business Education. I have spent the past 6 years working in the field, gaining a wide range of skills and knowledge. In my current role as a programmer, I have had the opportunity to work on a variety of projects and have developed a strong understanding of several programming languages such as python, java, C++, C# and Javascript.
In addition to my professional experience, I also have a passion for teaching and helping others to learn. I have experience as a tutor, both in a formal setting and on a one-on-one basis, and have a proven track record of helping students to succeed. I believe that with the right guidance and support, anyone can learn and excel in computer science.
I am excited to bring my skills and experience to a new opportunity and am always looking for ways to make an impact and grow as a professional. I am confident that my hands-on experience as a computer scientist and tutor make me a strong candidate for any role and I am excited to see where my career will take me next.
5.00+
8+ Reviews
22+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
Create a program that allows the user to enter any number of integers. The program should display the sum of the integers. Use the while statement and a negative number as the sentinel value. If...
-
Create a program that allows the user to enter the gender (either F or M) and GPA (0.0 through 4.0) for any number of students. The program should calculate and display the average GPA for all...
-
In this exercise, you will create a program that allows the user to enter an unknown number of sales amounts for each of three car dealerships: Dealership 1, Dealership 2, and Dealership 3. Use a...
-
Tonight at 7pm a professional basketball game featuring the Golden State Warriors and the Washington Wizards will be played at the Chase Center, an indoor arena in the Mission Bay neighborhood of San...
-
R = 4 with probability 0.25, R = 0.25 with probability 0.75. Find the arithmetic and geometric means of the random variables R for per capita production in the above cases. Check that the...
-
ne sum of the roots of the equation pa - 12x + 10 = 0 is 4. The quadratic equation pa - 42x + pk = 0 has two equal roots. Find the value of k. k =
-
Check whether the following can define probability distributions, and explain your answers. (a) \(f(x)=\frac{x}{10}\), for \(x=0,1,2,3,4\). (b) \(f(x)=\frac{1}{3}\), for \(x=-1,0,1\). (c)...
-
Kool-Ray is preparing its master budget for the quarter ended September 30. Budgeted sales and cash payments for merchandise for the next three months follow: Sales are 20% cash and 80% on credit....
-
Consider the following systems of linear equations: X1+0.5x2+x3 = -1 3x1+0.2x2 + 2x3 = 0 2x1 +0.1X2+X3 = 1 (a) Put the equation in compact matrix form Ax = B. (b) Find the inverse of matrix A using...
-
Assume that MPL = 5 and MPK = 10. Assume also that PL = $2 and PK = $5. This implies that the firm should substitute labor for capital. Explain why.
-
Figure 7-23 in the chapter showed two examples of the for statement. List the processing-steps for the code shown in Example 2, using Figure 7-24 as a guide. Syntax for (linitialization]; condition;...
-
In this exercise, you will modify the tip program shown earlier in Figure 7-31. Follow the instructions for starting C++ and viewing the ModifyThis16.cpp file, which is contained in either the...
-
The accounts of For You eTravel Inc. at December 31, 2017, are listed in alphabetical order. Requirements 1. All adjustments have been journalized and posted, but the closing entries have not been...
-
Depending on which of Exercises 7 through 12 you have completed, determine the required crosssectional areas of the members comprising one or more of the following structures. Assume steel members...
-
UniCom produces a wide range of consumer electronics. UniComs Newark, New York, plant produces two types of cordless phones: 2.4 GHz and 6.0 GHz. The following table summarizes operations at the...
-
In 2018, many unskilled workers in the United States earned the federal minimum wage of $7.25 per hour. By contrast, average earnings in 2018 were about $27 per hour, and certain highly skilled...
-
To change the volume of a gas isothermally by a factor \(f_{1}\) of its initial value, it is necessary to do work \(W_{1}\) on the gas. What work \(W_{2}\) is needed to change the volume by a factor...
-
From the accounts and values of Fred McKay as at 31 March 2022, prepare an accounting equation summary for assets, liabilities and owners equity. List the assets under the headings of current and...
-
Two identical spaceships are under construction. The constructed length of each spaceship is 1.50 km. After being launched, spaceship A moves away from earth at a constant velocity (speed is 0.850c)...
-
On January 2, 20X3, Sheldon Bass, a professional engineer, moved from Calgary to Edmonton to commence employment with Acco Ltd., a large public corporation. Because of his new employment contract,...
-
In this exercise, you modify the Sales application from Exercise 14 in Chapter 3. Use Windows to copy the Sales Solution folder from the VB2017\Chap03 folder to the VB2017\Chap04 folder. Open the...
-
Create a Windows Forms application. Use the following names for the project and solution, respectively: OnYourOwn Project and OnYourOwn Solution. Save the application in the VB2017\Chap04 folder....
-
The purpose of this exercise is to demonstrate the importance of testing an application thoroughly. Open the FixIt Solution.sln file contained in the VB2017\Chap04\FixIt Solution folder. The...
-
I choose "Tank Attacks" difficult behavior from the Brinkman book, Dealing with People You Can't Stand. And explained how that difficult behavior derives from one of the BEST personality types. 1....
-
Question 30 5 points Save Answer You are angry that a friend has accused you of betraying a confidence to another friend, and you didn't betray the confidence. Your friend called you names, made the...
-
1. What important fiber is not a carbohydrate? 2. Americans generally do not consume enough fiber. How much fiber should be consumed each day. 3. Why does brown rice contain more fiber than white...
Study smarter with the SolutionInn App