Reference no: EM132158581
A local beauty store manager would like to host a VIP beauty event for their top 10 loyal customers. They have gathered some data about their loyal customers including email address, number of items purchased, and first name and last name. Need help in writing a program that read in data from a file, sort the customers by the number of items purchased, and write the top 10 (by the number of items) customers to the output file.
The list of top 10 customers should be written to the same file name as the input file name with "top10_" added at the beginning. For example, if the original file name is customers.txt, the output file name is then top10_customers.txt.
1. Read the data using fscanf function. To read the name (last item in a line), use "%[^n]n" as the conversion specifier for fscanf function.
2. Define a structure customer to store the email address (string), num_items (integer), and name (string). Assume the email address and name are no more than 100 characters.
3. Build an array of customer structures. Assume that there are no more than 200 loyal customers.
4. Modify the selection_sort function provided to sort an array of customers by the number of items purchased. The function's first parameter should be modified to struct customer list[].
5. The output file should include the list of top 10 customers in the same format as the input file but in sorted order by number of items purchased
What will be the total value of the inflows after five years
: If the reinvestment assumption of the net present value method is used, what will be the total value of the inflows after five years
|
Describe the steps in building brand resonance
: Identify all its brand elements and assess their ability to contribute to brand equity according to the choice criteria identified in this chapter.
|
What is one negative health impact from carbohydrate intake
: What is meant by the AMDR, and what is this range for carbohydrates? How does the type of carbohydrate impact health?
|
How trade between the two countries benefits each of them
: Distinguish "absolute advantage" from "comparative advantage" in the context of your example.
|
Define a structure customer to store the email address
: Define a structure customer to store the email address (string), num_items (integer), and name (string). Assume the email address and name are no more than 100
|
Compute the total supply chain throughput time
: Compute the total supply chain throughput time for all the entities from beginning to end - Compute the cash-to-cash cycle time for each of the four entities
|
What is the net present value of the project
: Davis Chili Company is considering an investment of $26,000, What is the net present value of the project based on a 10% discount rate
|
Record the payment of semiannual interest
: On January 31, 2018, LogoLogistics, Inc., issued ten-year, 2% bonds payable with a face value of $12,000,000. Record the payment of semiannual interest
|
Availability and speed of internet connections play
: Lists the 10 countries with the fastest Internet connections. Is the United Sates among the top 10?
|