Create algorithm to read arbitrary number of data record

Assignment Help Data Structure & Algorithms
Reference no: EM1371896

1. Design an algorithm to read an arbitrary number of data records, each containing a name, age, and code. A Code of 1 will indicate female, a code of 2 will indicate male; and a code of 0 will indicate that the end-of-file has been reached. For each record, write a detail line listing the person's name and age. In addition, compute and output the following values: Number of males less than or equal to 21 yrs old. Number of females less than or equal to 21 years old. Avg age of all persons over 21. Total number of people.

Reference no: EM1371896

Questions Cloud

Write algorithm to create job applicant report : Write the algorithm to create job applicant report. Input consists of a series of records that contain the Social Security number or equivalent, last name, first name, middle initial.
Find the firm forward pe ratio : A corporation requires $500,000,000 to finance a major project in the firm. The company is expected to generate a total of $80,000,000 in earnings next year with the addition of this project.
Create algorithm to prepare daily hotel charge report : Create the algorithm to prepare the daily hotel charge report. Input consists of series of records which contain a room number, customer name, cost of the room, and cost of meals charged to the room.
Calculating the root mean square error : The table below demonstrate the demand for Fidgets over an eight month period. Calculate a four-period moving average forecast for September.
Create algorithm to read arbitrary number of data record : Create the algorithm to read arbitrary number of data records, each containing name, age, and code. Code of 1 will indicate female, a code of 2 will indicate male.
Prepare a dfd and context diagram for the system : Journal entries have to be reconciled with the spreadsheet on a daily basis - Prepare a context diagram for the system and also prepare a diagram 0 DFD for the system
Write non-recursive function-compute n-th fibonacci number : Fibonnacci series 0,1,1,2,3,5,8,13,21,... starts with terms 0 and 1 and has property that each succeeding terms is sum of the two preceding terms. Write the non-recursive function which computes the n'th Fibonacci number.
Calculate growth rate in sales : The following table demonstrate yearly sales information for Landrover, Inc., over the ten-year 1998-2008 period:
Calculate expected market price of stock : Estimate the price of a stock that has a one-period horizon, is expected to pay a dividend of $.20 per share for period,

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Steps of asymmetric encryption algorithms to read message

Using only asymmetric encryption algorithms write down any steps taken by Bob which permit him to read the message.

  Determining ciphertext generated by encryption

Determine ciphertext (in binary form) generated by encryption of character X?

  Create algorithm which generates access control matrix

Create an algorithm which generates the access control matrix A for any given history matrix H of the Chinese Wall model.

  Find terminal nodes in tree nil if pointer is represented

The node's right child. If the nil pointer is represented by 00 and the tree's root pointer contains 53, how many terminal nodes are in tree?

  Finding equation has no solutions mod m

Let the equation ax = b mod m, where x is unknown and a, b and m are given. Illustrate that this equation has either no solutions mod m, or d solutions mod m.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Processor sharing to worse performance than fcfs

Create a second experiment answering the question "Is it possible for processor sharing to have worse performance than FCFS? "

  Graph in which every node is pivotal for at least two nodes

Give an example of a graph in which every node is pivotal for at least two di fferent pairs of nodes. Explain your answer.

  Explain good algorithms to solve character pathfinding

You are working on the new computer game. One of implementation problems you are trying to solve is character pathfinding. What algorithms would be good to use and explain why?

  Data structures for a single algorithm

Data structures for a single algorithm

  Finding page faults for lru replacement algorithms

How many page faults would happen for the given replacement algorithms, assuming one, two, three, and four frames?

  Write the implementation of a data structure

Write an implementation of a data structure S that supports the following operations: Insert(S, x): insert the key x into S only if it is not already there.

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