Algorithm to read arbitrary number of data records

Assignment Help Data Structure & Algorithms
Reference no: EM1344698

Q1) Write the algorithm to read arbitrary number of data records, each comprising 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: EM1344698

Questions Cloud

Determine earnings per share for 2009 and 2010 : Because of the proceeds from these new shares and other operating improvements, earnings after taxes increased by 24 percent - Evaluate earnings per share for 2009 and 2010
Contango market and backwardation market : Write down the difference between a contango market and a backwardation market. What exactly is meant by a basis?
Compute the magnitude of the friction force : It is 155cm from your eyes to your toes. You're standing 190cm in front of the tall mirror. How far is it from your eyes to the image of your toes.
Profit maximization : To maximize amount of income realized from a rate increase, charges should be raised most in departments with:
Algorithm to read arbitrary number of data records : Write the algorithm to read arbitrary number of data records, each comprising name, age, and code.
What is an electric potential energy u of the system : Consider a too-small space station that consists of a 2.7m radius rotating sphere. A man standing inside is 1.9m tall and his feet are at 1g. What is the acceleration of his head.
What percentage return do you earn on the investment : Explain what percentage return do you earn on the investment - During the year the company distributes $ 0.75 in dividends
Explain how would each of these traps impact the production : Explain how would each of these traps impact the production possibilities frontier.
What is the time t required for the proton to re-emerge : Block 1, of mass m_1 = 0.500 kg, is connected over an ideal (massless and frictionless) pulley to block 2, of mass m_2. Suppose that the blocks accelerate with an acceleration of magnitude a = 0.550 m/s^2 and that coefficient of kinetic friction b..

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Data structures and algorithm design

Data Structures and Algorithm Design

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

  Evaluate the average complexity of an enqueue operation

Evaluate the average complexity of an enqueue operation. Determine the average complexity of the dequeue (remove) operation.

  Write a c++ program to find the intersection

Write a C++ program to find the intersection, A set is a collection of distinct entities regarded as a unit, being either individually specified or (more usually) satisfying specified conditions.

  Explaining instruction format of operation code field

Operation code field, a mode field, to specify one of seven addressing modes, a register address field to specify one of 60 processor registers, and memory address. Specify instruction format and number of bits in each field if the instruction ..

  Online vs. face-to-face classes

Communication A significant distinction between online and face-to-face classes lies in the area of communication.

  Write the selection sort algorithm

Write the selection sort algorithm

  Implementation of graph

Give the two input nodes after the graph has been built from the command prompt.

  Transmitting image using raster scan order

If we were to transmit this image using raster scan order, after 15 seconds how many rows of the image will the user have received?

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  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.

  Currency conversion development

Currency Conversion Development

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