Write cpp program and Calculate the weighted average of a list of n numbers. (Use function) Use formula: x_avg=f,x, + f2x2 + f2X3 ....+fnXn Where fnare the fractional weighting factors, i.e. Os fn <1 Find the values of n, fn and xn from the user and calculate x_avg.
Write cpp program and Calculate the weighted average of a list of n numbers. (Use function) Use formula: x_avg=f,x, + f2x2 + f2X3 ....+fnXn Where fnare the fractional weighting factors, i.e. Os fn <1 Find the values of n, fn and xn from the user and calculate x_avg.
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section: Chapter Questions
Problem 7PP: (Numerical) Heron’s formula for the area, A, of a triangle with sides of length a, b, and c is...
Related questions
Question
p.s :see image for question.
![Write cpp program and Calculate the weighted average of a list of n numbers. (Use function)
Use formula: x_avg=f,x1+ f2x2 + f2X3 ....+fn Xn
Where fnare the fractional weighting factors, i.e. OS fn < 1
Find the values of n, fnand Xn from the user and calculate x_avg.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fd1e01ffa-d9e7-4de9-a25b-7eea9b97b4a4%2F6c562d18-d3e6-4402-85b6-b1ee9cf7290e%2Fchrqyvn_processed.png&w=3840&q=75)
Transcribed Image Text:Write cpp program and Calculate the weighted average of a list of n numbers. (Use function)
Use formula: x_avg=f,x1+ f2x2 + f2X3 ....+fn Xn
Where fnare the fractional weighting factors, i.e. OS fn < 1
Find the values of n, fnand Xn from the user and calculate x_avg.
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr