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

  Create time algorithm-minimum time required to finish task

Create the O(|V | + | E |) time algorithm which, given times ti and the dependencies, determines minimum time required to complete all the tasks.

  Data structures and algorithms

Provides learners with an understanding of how data structures are used in algorithms and enables them to design and implement data structures

  Algorithm-find schedule to obtain maximum amount of profit

Give an algorithm to find schedule which obtains maximum amount of profit, assuming that all processing times are integers between 1 and n.

  Data structures assignment requiring c++ program

You should build enough new roads such that if City A was reachable from City B via some old roads, City A must be reachable from City B via some new roads.

  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?

  Build b tree for the part table

Build B+ tree for the PART table with n = 6 pointers; illustrate how B+ tree expand (show several intermediate trees) and what final tree will look like.

  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.

  Calculate shortest path-djkstra-s shortest path algorithm

With indicated link costs, use Djkstra's shortest path algorithm to calculate shortest path from E to all network nodes. Illustrate how algorithm works by computing table.

  Write algorithm to prompt for and accept four numbers

Write the algorithm which will prompt for and accept four numbers, sort them into ascending sequence and display them to screen. Your algorithm is to include module called Order _two_numbers.

  Algorithm for locating nth successor in circlar linked list

Write algorithm or code segment for locating nth successor of an item in circlar linked list (the nth item that follows the given item in the list).

  Describe sorting algorithms and how they work

Describe sorting algorithms and how they work

  Writing algorithm which ?nds xbest

Provide an O(n) algorithm which ?nds xbest such that distbest:= ∑i=1 to n|xbest - xi| is as small as possible.

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