Question: Please write in C programming Define the following data type that contains US State information. typedef struct char State-Name [20] double Total-Area i double Water

Please write in C programming

Please write in C programming Define the following data type that contains

US State information. typedef struct char State-Name [20] double Total-Area i double

Define the following data type that contains US State information. typedef struct char State-Name [20] double Total-Area i double Water Area; double Land.Area; int Population; int Population-per-Land.Area Statei Develop a C program that reads a file called State Data.txt into a 10-element array of type State. The file State Data.txt contains the name of the state, the population in the state, the total area of the state in square miles, and the area that is covered in water (also in square miles). You will need to calculate population per land area (rounded to the nearest person per square mile). Note that the land area is the total area minus the area covered in water. The program then prints the states sorted by population per square mile. Your program should use the following functions void scan-states (Statex,FILE in) void print-states (Statex) File State Data.txt: 10450316 59425.15 1911.66 28449186 268596.46 7364.75 7026629 113990.30 396.22 21002678 65757.70 12132.94 Georgia Texas Arizona Florida California39849872 163694.74 7915.52 Pennsylvania 12819975 46054.35 1311.64 Illinoiis Michigar Virginia Washington7384721 71297.95 4842.43 12815607 57913.55 2394.62 9935116 96713.51 40174.61 8492783 42774.93 3284.84

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!