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

The video game machines at your local arcade output coupons depending on how well you played the game, you can redeem 10 coupons for a candy bar, 6 coupons for .a medium soft drink

Overloading a method (or function) in C++ is the ability for functions of the similar name to be defined as long as these methods have dissimilar signatures (different set of param

You are given a collection of words, say as in a dictionary. You can represent it in the following compressed form: the first word will be followed by a sequence of a pair of numbe

How many levels deep can include files be nested? - As such, there is no limit to number of levels of nested include files you can have however your compiler might run out of s

Explain the Declaration of Multi Dimensional Arrays? In the figure, the range in the first dimension is 3 and in the second dimension is 4. The shaded portion corresponds to th

Write a c program to determine interchanged values between two variables?[Hint - if loop] What will be the output of the program? How many times this loop will execute? Wr

sample of program that use in bubble sort using assignment operator in c++

Derived Data Type: Array is derived data type to store large collection of data of only one data type. int mark[100]; char names[25]; Function: will be discussed early

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.   #include float start_poin