Pascal programming , C/C++ Programming

1. The management of a company would like to determine the median annual salary of its employees.Write a pascal program that display the number of employees and their median salary,given the number of employees and their salaries as input data.
Use the following steps when designing your program:
a. obtain the numbers of salaries N and the employees salaries.
b.sort the salaries.
c.compute the median salary as follows:
If N is odd then the median is the middle salary.
otherwise,the median salary is the average of the two middle salaries.
d.display N and the median salary.

A maximum of 500 employees for the company is assumed.Use the following sample output data to run and test your program:
how many employees (500 or less)? 5
Enter the salaries:
20000  30000  25000  60000  40000
number of salaries: 5
median salary is : 30000

2.An instructor wants a program to score multiple-choice examinations.An input data file is provided which has the answer key and the responses of each student.Each line has student identification information in the first nine columns,followed by a variable number of responses.The student identification number in the first line is to be ignored,as the responses represent the correct answers to the questions.Responses are uppercase alphabetic characters or blank.Blank is used to indicate that question is not to be scored.The remaining lines in the indicated in the answer key should be ignored.Write the program that will score the exams,providing the student identification,number of correct responses,and percentage score for each student.

Example input:


example output:

student  correct    percentage
808732533 10      100

Posted Date: 2/22/2013 8:22:20 AM | Location : United States

Related Discussions:- Pascal programming , Assignment Help, Ask Question on Pascal programming , Get Answer, Expert's Help, Pascal programming Discussions

Write discussion on Pascal programming
Your posts are moderated
Related Questions
Problem: (a) Show the Java approach to event processing by explaining how event handling works in Java. Make use of a suitable example to support your answer. (b) Describe

F r i e n dly Function: A class can have public members and private members.   The public member can be used through the class using dot operator.   Where as private me

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Ba s i c r u l e s o f C + + p r o g r a m : ·     I t m u s t h a v e o n l y o n e m a i n f u n c ti o n ·

There are ''n'' ants on a ''n+1'' length rod. The ants are numbered from 1 to n and are initially placed at positions starting from position 1 till position n. They are moving eith

in this problem you are given a board in which some of the elements are placed..each element represent ancolor.fill the other elements in the board such that none of the adjacent e

Expected output of the program: 1. Consider the following programs. For each, indicate whether the program is correct. If yes, what is the expected output? If not, what is the

Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

Of course it is C[i] = A[i] + B[i].It was a typing mistake,never mind. You just understand the concept. 27-1 b. for grain-size=1 n=A.length grain-size=1 r=n for

to compute the net pay of an emplyee, given his/her pay rate, number of hours and tax rate