Ask Question, Ask an Expert


Ask Programming Language Expert

Q1. Pupils' heights

The health visitor at a school is going to evaluate the heights of all pupils. For each class she makes a statistics giving the number of pupils of each height and the average height.

Create a C++ program which assists the health visitor making the statistics.
ex:  In a class with 20 pupils the heights of the individual pupils, in centimetres, are:

175, 167, 160, 164, 183, 187, 188, 179, 176, 175,
169, 175, 176, 178, 165, 160, 173, 165, 187, 178

The program must read in all the numbers and make a table like this:

Height number of pupils

160  2
164  1
165  2
167  1
...  ...
...  ...
188 1 average height 174.0 Maximum Number of Students lies between 173 and 179 
Q2. Find the nth smallest number in an unsorted array of numbers. prepare a C++ Program.

Hint [14 are 3rd smallest number is this array {25, 14, 10, 5, 50, 30} Hint: First sort the array
Q3. prepare a C++ program that finds square root of number?
Q4. Set theory: prepare C++ programs that declare/initialize two integer arrays A and B of size 10. You program takes input values from user. Initialize an integer array U of size 50 with first fifty positive integers. Your program provides following functionality to user.

Press N or n for A intersection B
Press U or u for A Union B
Press / for A / B
Press \ for B / A
Press A or a for A’s Complement
Press B or b for B’s Complement
Press D to prove De Morgan’s Law

You program continues till user desire to quit. Output of your programs must be in set representations that is, A union B = {2, 4, 34, 20} OR A’s Complement = {45, 34, 22}. In case of De Morgan’s Law compute intersection or Union first and then apply complement.

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M91360

Have any Question? 

Related Questions in Programming Language

Assignemntbulla non-gui based java application that

Assignemnt •A non-GUI based Java application that fulfills the requirements listed below. All output should be to the console/standard output. •Salespersons for Big State Books receive a commission of ten percent for eac ...

Assignmentwrite a program that calculates the intersection

Assignment Write a program that calculates the intersection of two sets of numbers. The sets can be represented using arrays. The general idea is that A!=0 if i is in the set and A==0 if it is not. Array element A can th ...

Assignmentgoalsto learn about separate compilation classes

Assignment Goals To learn about separate compilation, classes, and vector manipulation. Your Assignment In this assignment the main has been written for you in the file phone_book_main.cpp. You will also notice that a cl ...

Assignmentscenarioyou are working for an art gallery the

Assignment Scenario: You are working for an Art Gallery. The gallery sells paintings for office rooms. An application is needed to manage all of the paintings available in inventory. The gallery has limited space and can ...

Note that these regular expressions give all of the

Note that these regular expressions give all of the following symbols (operator characters) a special meaning: \ " . - $ [ ] * + ? { } | / Their special meaning must be turned off if they are needed to represent them-sel ...

Generate code for the following three-address statements

Generate code for the following three-address statements assuming stack allocation where register SP points to the top of the stack. a) x = 1 b) x = a c) x = a + 1 d) x = a + b e)The two statements x = b * c y = a + x

Rainfall programwrite a rainfall program that stores the

Rainfall Program Write a RainFall program that stores the total rainfall for each of 12 months into an array of doubles. The program should have methods that return the following: * The total rainfall for the year * The ...

Programming taskswhile working on the tasks below you are

Programming tasks While working on the tasks below, you are free to request assistance on D2L at: Communications / Discussions / Assignments (or other appropriate sub-topic) These tasks entail modifying your prior code f ...

Assignment instructionsexception handlingfirst create three

Assignment Instructions Exception Handling First, create three exception classes named NumberHighException, NumberLowException, and NumberNegativeException. Both NumberHighException and NumberLowException should be direc ...

Programming assignmentdescription your algorithm first

Programming Assignment Description: Your algorithm first takes an input size (N) from the user and generates a random sequence of N integers ranging from -99999 to 99999. If N is less than 50, your program must print the ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

WalMart Identification of theory and critical discussion

Drawing on the prescribed text and/or relevant academic literature, produce a paper which discusses the nature of group

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro