Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

WRITTEN IN C CODE ONLY INTRODUCTION: In order to determine a suitable site for a wind turbine in a mountain canyon, wind speed data was

WRITTEN IN C CODE ONLY

image text in transcribed

image text in transcribed

image text in transcribed

INTRODUCTION: In order to determine a suitable site for a wind turbine in a mountain canyon, wind speed data was collected over a 24-hour period. The data was collected at the mouth of the canyon, and at a location one mile downstream from the mouth. The data was placed in an input file called wind turbine. The first record line contains the two-dimensional array size (rows and columns). The second record line contains the mountain canyon name. The remaining record lines contain the hour of the day (24-hour clock), the average wind speeds at the mouth of the canyon, and the average wind speeds one mile downstream respectively ASSIGNMENT: Write a C program that will do the following 1) Read the size (nrows and ncols) of the two-dimensional array from the input file 2) Using a one-dimensional character array read the canyon name 3) Using a two-dimensional array read the hour, the mouth wind speed, and the downstream wind speed 4) Compute the average 24-hour wind speed at the mouth of the canyon. 5) Compute the average 24-hour wind speed one mile downstream 6) Determine the minimum wind speed and hour that it occurred 7) Determine the maximum wind speed and hour that it occurred Additionally, assume that the maximum wind speed that the turbine can sustain is 19.5 miles per hour Compute the hour ofthe day that the 19.5 miles per hour occurred for the one-mile downstream wind speeds To compute the hour of the day for 19.5 miles per hour you will use linear interpolation. The equation is Where y is the computed hours, x is the interpolating value, xl is the first downstream wind speed, x2 is the second downstream wind speed, y1 is the first hour, and y2 is the second hour. A partial flowchart is provided ow Your program will print to the computer screen and to an output file called wind report Notice that you will be printing the time column based on a 24-hour clock. That means that when the time is less than 1000 hours you will need to print a leading zero. A partial flowchart is provided below For the composite report 1. When printing the minimum wind speed, if the time of the minimum wind speed is less than 1000 hours, print the wind speed and print the time with a leading zero, else print the wind speed and time 2. When printing the maximum wind speed, if the time of the maximum wind speed is less than 1000 hours, print the wind speed and print the time with a leading zero, else print the wind speed and time

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

Advanced Oracle Solaris 11 System Administration

Authors: Bill Calkins

1st Edition

0133007170, 9780133007176

More Books

Students also viewed these Databases questions

Question

6. What is moral hazard? How do banks reduce this problem? LOP8

Answered: 1 week ago