INTRODUCTION: in 1899 a very large tsunami was recorded in the Gulf of Alaska with a hcight of 197 feet, and an even large sunami was recorded in 1964 with a height of 230 feet. Tsunami data has been collected from 1992 to 199 and placed in a file containing the following: 1) the number of tsunamis recorded; 2) the month, day, and y of cach recording; 3) the location; 4) the wave height in feet; 5) the number of fatalities. The input file is c sunamis. ASSIGNMENT: Using an array of structures, write a C program that will execute in the following order: 1) read the tsunam into an array of structures; 2) sort the data by year in ascending order using a bubble sorting algorithm; 3) compute the average wave height; 4) find the minimum and maximum wave heights; 5) determine and prim sunamis that had wave heights greater than the average. Print the results to the computer screen and to an output file called tsunamis_report OUTPUT FORMAT: TSUNAMI DATA Month Day Location Height Fatalities Year XXXX SssssssSS5sssssss XX.X XXXX sssssssss XXXX S5sssssS85835SSSS XX.X XXXX SSsssssSSS Summary Report: Minimum wave height - xx.x feet Maximum wave height = xx.x feet Average wave height = xx. Xx feet The tsunamis with greater than the average wave height are: SSssssssssss5555s

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
INTRODUCTION:
In 1899 a very large tsunami was recorded in the Gulf of Alaska with a height of 197 feet, and an even larger
tsunami was recorded in 1964 with a height of 230 feet. Tsunami data has been collected from 1992 to 1998
and placed in a file containing the following: 1) the number of tsunamis recorded; 2) the month, day, and year
of cach recording; 3) the location; 4) the wave height in feet; 5) the number of fatalities. The input file is called
tsunamis.
ASSIGNMENT:
Using an array of structures, write a C program that will execute in the following order: 1) read the tsunami data
into an array of structures; 2) sort the data by year in ascending order using a bubble sorting algorithm; 3)
compute the average wave height; 4) find the minimum and maximum wave heights; 5) determine and print the
tsunamis that had wave heights greater than the average.
Print the results to the computer screen and to an output file called tsunamis_report.
OUTPUT FORMAT:
****
TSUNAMI DATA
Month
Day
Location
Height
Fatalities
Year
XXXX
Ssssssss9ssssssss
XX.X
SSssss SSS
XX
XXXX
Ssssssssssssssss
XX.X
XXXX
SSsssssSSS
XXXX
Summary Report:
Minimum wave height xx.x feet
Maximum wave height xx.x feet
Average wave height- xx.XX feet
The tsunamis with greater than the average wave height are:
SSsss55S5sssssSSS
Transcribed Image Text:INTRODUCTION: In 1899 a very large tsunami was recorded in the Gulf of Alaska with a height of 197 feet, and an even larger tsunami was recorded in 1964 with a height of 230 feet. Tsunami data has been collected from 1992 to 1998 and placed in a file containing the following: 1) the number of tsunamis recorded; 2) the month, day, and year of cach recording; 3) the location; 4) the wave height in feet; 5) the number of fatalities. The input file is called tsunamis. ASSIGNMENT: Using an array of structures, write a C program that will execute in the following order: 1) read the tsunami data into an array of structures; 2) sort the data by year in ascending order using a bubble sorting algorithm; 3) compute the average wave height; 4) find the minimum and maximum wave heights; 5) determine and print the tsunamis that had wave heights greater than the average. Print the results to the computer screen and to an output file called tsunamis_report. OUTPUT FORMAT: **** TSUNAMI DATA Month Day Location Height Fatalities Year XXXX Ssssssss9ssssssss XX.X SSssss SSS XX XXXX Ssssssssssssssss XX.X XXXX SSsssssSSS XXXX Summary Report: Minimum wave height xx.x feet Maximum wave height xx.x feet Average wave height- xx.XX feet The tsunamis with greater than the average wave height are: SSsss55S5sssssSSS
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY