C program that prompts the user to enter some data

Assignment Help Operating System
Reference no: EM13943244

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)

Reference no: EM13943244

Questions Cloud

Firm receives payment from harvests sometime after shipment : Sunnydale Organics, Inc. harvests crops in roughly 3-month cycles. The firm receives payment from its harvests sometime after shipment. Due in part to the firm's rapid growth, it has been borrowing to finance its harvests using 3-month bank notes on ..
Find amount of additional steam entering from branch pipe : A steam press at 650Kpa + dryness fraction of 0.9% flows along a pipe at a rate of 3.5Kg per second. Steam mixes with additional steam that has been throttled from a pressure of 2000Kpa to a pressure of 800Kpa which enters from a branch pipe. If t..
Develop a budget for your project : Explain the process for identifying and managing risk in a project - Draft an email to your project sponsor to gain their approval of your project budget - BSBPMG522
Capital structures-price per share of equity under plan : Cooke Co. is comparing two different capital structures. Plan I would result in 8,700 shares of stock and $323,000 in debt. Plan II would result in 12,000 shares of stock and $210,800 in debt. What is the price per share of equity under Plan I?
C program that prompts the user to enter some data : If the user enters -999 as the first account number, the program should simply exit, and display an appropriate message of your choice.
What has been the change in the position of the left monkey : Then the monkey on the right begins to climb the rope while the monkey on the left simply holds on. When the right monkey has raised himself through height h(relative to the floor), what has been the change in the position of the left monkey?
What will be the net cash flow from the sale : The Wise Co. purchased a new truck two years ago for $56,000. The company uses MACRS depreciation for accounting purposes. The truck is classified as 5-year property, which has depreciation allowances of 20%, 32%, and 19.20% for the first three years..
Moderate levels of operating leverage and business risk : Assume that your firm has moderate levels of operating leverage and business risk. Your factories are dependent upon a lot of low-wage earners that come and go frequently and thus are considered a somewhat variable cost. You expect the next several y..
No corporate tax-what is cost of equity capital : Crosby Industries has a debt-equity ratio of 1.5. Its WACC is 11 percent, and its cost of debt is 8 percent. There is no corporate tax. What is Crosby’s cost of equity capital? What would the cost of equity be if the debt-equity ratio were 0.7?

Reviews

Write a Review

Operating System Questions & Answers

  Determine transmission line speed

Imagine you are creating an application at work that transmits data record to another building within the similar city. The data records are 500 bytes in length,

  Implement a program to simulate the operation

Design and implement a program to simulate the operation of the SIMMAC - define the notion of an interrupt handler that will process a time quantum for ea ch running job.

  Creating program with a gui in vb.net

Create a program with a Graphical User Interface in VB.Net. Create it so that the user can input the amount and term of the mortgage as well as the interest rate.

  Why the lynx companys functional system has been successful

Consider the following scenario involving a functional system used by the Lynx Company. The Lynx Company uses a functional system for their sales system. Identify five reasons why the Lynx Company's functional system has been successful (be sure t..

  What exactly are the static and dynamic chains

Do I have enough information to do this problem and What exactly are the static and dynamic Chains? I am not a programmer and I am trying to get this right.

  How can the evolution of os benefit an organization

Why are there so many versions of OS. This will be the foundation for future discussions by your classmates. Be substantive and clear, and use examples to reinforce your ideas.

  Intervlan routing

Submit a 1-page Word document containing a screenshot of your final score from each simulation as well as a 1-paragraph summary in your own words on your lessons learned. You will be graded based on your score for completing the simulations and th..

  Currently the atm is idle

Currently the ATM is idle. Find the probabilities that, in 3 minutes, the ATM will be idle; will be serving one customer with no one in the queue; will be serving one customer with one customer waiting in the queue

  Differences and similarities between linux and unix?

What are some distinct differences and similarities between Linux and Unix? Why do you think it is important to know about both of these operating systems

  Implement a basic shell that restricts the runtime of

implement a basic shell that restricts the runtime of processes executed from within it. your shell will read input

  Question about data communications

A 4480 octet datagram is to be transmitted and requires to be fragmented because it will pass through an Ethernet with a maximum payload of 1500 octets.

  How x25 kernel provide for user-level thread implementation

Detail the considerations that are involved in selecting a target operating system to serve as a potential host for the design and implementation of a virtual machine monitor that would support a specific guest operating system.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd