Write a C program that prompts the user to enter some data regarding some clients. The user should prompt for client account number (a UNIQUE positive integer between 1 and 1000), a name (a string, up to 25 in length), and the account balance (a positive floating point number) as shown below. The user input terminates once the user enters a -999 as the account number.
I will let you decide the appropriate prompts and edit messages.
You should store this information in an array of type struct (something).
Make the array sizes large enough to hold data for up to 25 clients.
Once the user has completed entering the data, the program should then SORT THE DATA IN ASCENDING ORDER BY ACCOUNT NUMBER, OR NAME OR BALANCE, and output the client data in table form of your design or exactly as follows BELOW.
If the user enters -999 as the first account number, the program should simply exit, and display an appropriate message of your choice.
The report will also be directed to an output text file with the same output as printed to the screen. Sample I-O below - user responses are in coral:
Welcome to Client Center
Enter Client Number (1-1000; -999 to end): 123
Enter full name for client number 123: Doe, John
Enter Balance amount for employee Doe, John: 1022
Enter Client Number (1-1000; -999 to end): 233
Enter full name for client number 233: Doe, Jane
Enter Balance amount for employee Doe, Jane: 4443
Enter Client Number (1-1000; -999 to end): 543
Enter full name for client number 543: Smith, Ron
Enter Balance amount for employee Smith, Ron: 1102
Enter Client Number (1-1000; -999 to end): 123
Client number entered has already been used, re-enter.
Enter Client Number (1-1000; -999 to end): 129
Enter full name for client number 129: Smythe, Bill
Enter Balance amount for employee Smythe, Bill: 5555
Enter Client Number (1-1000; -999 to end): -999
4 clients
Sort by: Client Number(N), Name(A) or Balance (B): n
Client Number Client Name Balance
0123 Doe, John 1022.00
0129 Smythe, Bill 5555.00
0233 Doe, Jane 4443.00
0543 Smith, Ron 1102.00
(Report has been sent to report5.txt also)