b) Data of strain measured at several points on a machine structure is available in a file named strain.txt. Write a program that read these data and calculate the average strain (ɛave)and the standan deviation (7) of the data using the following formulas. E ave %3D i=1 (ɛ, ave The use of the loop and array provision in C++ is a must. Show the formatted output or the monitor such as shown in the sample output below.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter8: Advanced Data Handling Concepts
Section: Chapter Questions
Problem 7PE
icon
Related questions
Question
b) Data of strain measured at several points on a machine structure is available in a file named
strain.txt.
Write a program that read these data and calculate the average strain (ɛave)and the standard
deviation (0) of the data using the following formulas.
E ave
%3D
i=1
O =.
ave
The use of the loop and array provision in C+ is a must. Show the formatted output on
the monitor such as shown in the sample output below.
Data in strain.txt,
No
Strains (10-3)
1
1.214
1.196
3
1.208
4
1.187
1.201
Sample output:
Strain data
No
Strains (10-3)
1
1.214
2
1.196
3
1.208
4
1.187
1.201
Average: 1.2012 (10-3)
Std. deviation: 0.0209
Transcribed Image Text:b) Data of strain measured at several points on a machine structure is available in a file named strain.txt. Write a program that read these data and calculate the average strain (ɛave)and the standard deviation (0) of the data using the following formulas. E ave %3D i=1 O =. ave The use of the loop and array provision in C+ is a must. Show the formatted output on the monitor such as shown in the sample output below. Data in strain.txt, No Strains (10-3) 1 1.214 1.196 3 1.208 4 1.187 1.201 Sample output: Strain data No Strains (10-3) 1 1.214 2 1.196 3 1.208 4 1.187 1.201 Average: 1.2012 (10-3) Std. deviation: 0.0209
Expert Solution
steps

Step by step

Solved in 5 steps with 3 images

Blurred answer
Knowledge Booster
Array
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr