Question: This is an electrical engineering computer science programming question, can someone answer it at all? USE VISUAL STUDIO C++ 2015 THIS IS SUPPOSED TO BE
This is an electrical engineering computer science programming question, can someone answer it at all?
USE VISUAL STUDIO C++ 2015
THIS IS SUPPOSED TO BE ANSWERED AS A PROGRAM, NOT ANYTHING ELSE
USE #include
I've seen that this question has been answered incorrectly 4 times already since its been posted before, so ANSWER IT AS IT IS ASKED PLEASE
You have to read a file, that I provided at the bottom.
THE SAMPLE EXECUTION IS INCLUDED AND THAT IS EXACTLY HOW THE ANSWERS SHOULD BE DISPLAYED BY THE PROGRAM
THANK YOU IN ADVANCE!





That file is called the placelist.txt file and it is also right here so you can copy it:
Vancouver International Airport Canada 49.196691 -123.181512 Tucson International Airport USA 32.114510 -110.939227 University of Arizona USA 32.231885 -110.950109 Statue of Liberty USA 40.689249 -74.044500 Big Ben UK 51.500729 -0.124625 Forbidden City China 39.916345 116.397155 Sydney Opera House Australia -33.856784 151.215297 Ministro Pistarini International Airport Argentina -34.815004 -58.534828 Colosseo Italy 41.890210 12.492231 Golden Gate Bridge USA 37.819929 -122.478255
Problem 2 (35 points): The file placelist.txt contains the place information (name, country. latitude and longitude). Write a C program that a) Reads places from a file called placelist.txt and stores it in an array of type place b) Prints, on screen, places in the database that are NOT in USA. c) Sorts the array of places in distance from Tucson city center and print the sorted array on screen. To do so, you will modify the void selection(int x[], int size) function that sorts ints given on the next page. If you hard-code the list of cities sorted by distance in your code, 0 point for this problem 1) Your program MUST use the following structure: typedef struct place_s char name [100]; char country[30] double latitude; double longitude; place; Note: the above structure can be modified (i.e., to include distance) so that it can be used with sorting. Problem 2 (35 points): The file placelist.txt contains the place information (name, country. latitude and longitude). Write a C program that a) Reads places from a file called placelist.txt and stores it in an array of type place b) Prints, on screen, places in the database that are NOT in USA. c) Sorts the array of places in distance from Tucson city center and print the sorted array on screen. To do so, you will modify the void selection(int x[], int size) function that sorts ints given on the next page. If you hard-code the list of cities sorted by distance in your code, 0 point for this problem 1) Your program MUST use the following structure: typedef struct place_s char name [100]; char country[30] double latitude; double longitude; place; Note: the above structure can be modified (i.e., to include distance) so that it can be used with sorting
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
