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

  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.

  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?

  Create a solution algorithm using pseudocode

Algorithm that will receive two integer items from a terminal operator, and display to the screen their sum, difference, product and quotient.

  Converting arithmetic expression in reverse polish notation

Convert the following numerical arithmetic expression into reverse Polish notation and show the stack operations for evaluating the numerical result.

  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.

  Different applications of data structure

What are the different applications of Data Structure

  Find the minimum cost path from a designated node

Find the Minimum Cost Path from a designated start node to a designated destination node in a graph.

  Threat model to describe risk of attack vector

Construct a simple threat model that describes the risk this represents: attacker(s), attack vector, vulnerability, assets, and likelihood of occurrence, likely impact, and plausible mitigations.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Data structures and algorithm design

Data Structures and Algorithm Design

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Js code to prompt the user for integer and print result

Write JS code which prompt the user for an integer and prints the result.

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