VisualC++ programming

timer Asked: Apr 3rd, 2015

Question description

31. Write a program to generate a data file named wind.dat that contains 1 hour of simulated wind speeds. Each line of the data file should contain the time in seconds and the corresponding wind speed. The time should start with 0 seconds. The increment in time should be 10 seconds and the final line of the data should correspond to 3600 seconds. The user should be prompted to enter the average wind speed and the range of values of the gusts.

32. In problem 31, assume that we want the flight simulator wind data to include a 0.5% possibility of encountering a small storm at each time step. Therefore, modify the solution to problem 31 so that the average wind speed is increase by 10 mph for a period of 5 minutes when a storm is encountered. 

The program should

(1) set the precision to 4 decimal places,
(2) apply srand() function,
(3) use module to generate windspeeds.

Tutor Answer

(Top Tutor) Studypool Tutor
School: UT Austin
Studypool has helped 1,244,100 students
flag Report DMCA
Similar Questions
Hot Questions
Related Tags

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors