Your goal is to write a C program that queries the user for
Your goal is to write a C program that queries the user for a price range, and prints a list of houses that are within the data range. Your program will read data from a text file , load the data into an array of structures, then parse through the data using the specified minimum and maximum prices.
1) Define a structure called house. This structure should contain three members:
address - a string (needs to hold strings up to 29 characters, not including a null byte)
zip - a long (values between 10000 and 99999)
price - a float
Then, create an array of these structures. Call the array listings. Give this array global scope. The array should contain 500 elements.
2) Your program should query the user for a minimum and maximum price range. Your program should accept input with or without a dollar sign character \'$\'. If the user types in invalid data (eg. something other than a number, or a negative number), the program should notify the user that the input was invalid and end.
Your program should also ensure that the entered maximum value is not less than the minimum value. In this case, your program should notify the user of this and end.
Your program should write these two values to variables (they will be used in Part 4).
3) Upload the data file to your project work area. Your program should open this file with read access.
Next, read the data from the file, saving it into your listings array of structures. The data file contains ASCII data, formatted as follows:
Each line of the file represents a house
Each line contains three values, separated by commas:
The first value is the street address (never longer than 29 characters)
The second value is the zip code
The third value is the price, including a dollar sign character \'$\'
Each value should be saved in the corresponding member of the array.
4) Finally, your program should print out each house that is within the price range specified in Part 2. The limits are inclusive (for example, if the maximum is 70000.00, houses priced at exactly 70000.00 would be included). For each house that matches, the program should print out the price, followed by the address and zip code (one house per line).
5) In Part 4, print out the matching houses in order of price (lowest first).
Solution
string address[29];
long zip[9999];
int price [10];
}
void pricerange(int, int)
{
int min,max=70000;
printf(\"please enter minimum and maximum price range\");
scanf(\"%f,%f,\",&min,&max);
if(max<min)
{
PRintf(\"invalid please enter a valid value\");
}
}

