Develop a program that reads from an input CSV file named input.csv the pairs of values of distance (meters) from left b
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Develop a program that reads from an input CSV file named input.csv the pairs of values of distance (meters) from left b
Develop a program that reads from an input CSV file named input.csv the pairs of values of distance (meters) from left bank and the river depth y (meters) at that location, for a given cross-section. Note that the x values are equidistant with each other. The file will have the following format Format: Example: pusat <number of data pts File Format <xl> <y> cx2> <h2> 5,2.32 10,4.6 <xm> <y> 15,4.64 20,3.33 25,2.51 7 M 10 15 2.32 4.0 4.66 2.51 25 30 30, The program will use the composite Trapezoidal Rule and composite Simpson's Rule to approximate the area of the river cross-section SPECIFICATIONS 1. Let the user choose between implementing (a) the composite Trapezoidal Rule, or (b) the composite Simpson's Rule. 2. Open the file input.csv and read the data contained within 3. Display the computed area of the river cross-section on the screen. HINT: Use a running total variable to solve for the summations as your program reads through the input file.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!