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

  What is data-processing cycle

What is data-processing cycle

  Degree of scope creep

There is a school of thought that discusses that, far from being undesirable, few degree of scope creep may in fact be beneficial for certain types of assignments.

  Inventory management systemsyour sister owns a small

inventory management systemsyour sister owns a small clothing store. during a conversation at a family dinner she

  Question about computer memory cells

Discuss how many cells can be in a computer's main memory if each cell's address can be represented by two hexadecimal digits?

  Different memory allocation and deallocation techniques

The objective of this is to simulate and evaluate different memory allocation/deallocation techniques (first fit, next fit, best fit, and worst fit)when a linked list is used to keep track of memory usage.

  Models to utilize for la-z-boy

Must support the 4P's of marketing : price, promotion, product, and place. APA style formatt and references.

  A spawned process

A spawned process may be destroyed automatically when its parent is destroyed, as one method; another design is to have spawned processes proceed independent of the parent

  What is the l2 read miss penalty?

s computer calculate the following: (a) What is the L2 read miss penalty? (b) What is the L1 read miss penalty? (c) What is the read penalty (L1 and L2 cache)? (d) Assume 33% (1/3) loads, and everything else is ideal. What is the CPI? (e) What would ..

  1 whenever a thread references a part of the virtual

1 whenever a thread references a part of the virtual address space that is not currently loaded in the primary memory

  Network crashes are hypothesized

Assume we are using Lamport's hash, and Bob's system crashes before receiving Alice's reply to a message.

  Website migration project

Evaluate alternatives to the company self-hosting the site and build a Gantt chart using Microsoft Project or equivalent software, showing all tasks associated with implementing the Website.

  Implement a basic shell that restricts runtime of processes

Implement a basic shell that restricts the runtime of processes executed from within it. Your shell will read input from the users and execute it as a new process, but if that program runs longer than it should, your shell will kill the process an..

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