Program construction tasks


Task 1:

Write a program, which produces the list of results for decathlon's
first day for one competitor on the basis of points entered by the user.
The events of the first day are: 100m, long jump, shot put, high jump and 400m.
On each entered event, the points of the event in question as well as
comptetitor's total points must become evident from the result list.

Task 2:

A small sized helicopter is able to carry 100kg of luggage in addition to four
passengers. Write a program for the use of an airport official that informs
the remaining capacity for the luggage on the basis of luggage weights
entered by the official. After the treatment of each passenger the
program must inform how much luggage can still be taken in.   

Task 3:

Write a program, which reports the daily average
rainfall from the daily rainfalls given by the
user. The user must be able to enter as many
rainfalls as he wants. The user ends entering
the rainfalls by giving a negative rainfall.

Task 4:

Write a program for the use of a payroll accountant that
calculates the total labour costs of a company on the basis of single   
salaries. The accountant must be able to enter as many salaries as
he/she wants. The program must inform how many salaries has been     
counted and how big are the company's total labour costs when the   
proportion of social costs is added to the total labor costs.
The payroll accountant stops entering the salaries by giving
a negative value. The payroll accountant gives the porportion of
social costs as a single percentage.

Task 5:

During an auction several articles are sold and each article
can end up having a different price on the grounds of the bids.
Write a program for the use of an auctioneer that shows the
progress of the auction on the basis of single prices given
by the auctioneer.

After each sold article the auctioneer wants to see how many
articles have been sold this far, was the last article
more or less expensive than the second last, what has been
the highest price for a single article and how much money
still has to be gained in order to reach the target sum defined
for the auction.

At the end the program must inform the price of the most
expensive article sold in the auction and whether the target
sum was reached or not. The auctioneer enters the target sum
before the auction starts.

Task 6:

During a surgery operation an assistant surgeon can dose the patient
with a drug, which prevents the coagulation of the blood, several times.
Each dosage can be different. Write a program for the use in the operating
room that shows the progress of the medication on the basis of single
dosages given by the surgeon.

After each dosage the surgeon wants to see how many
doses have been given this far, was the last dosage
smaller or bigger than the second last, what has been
the biggest given dosage and how much the patient can still
be dosed without exceeding the recommended maximum amount
for the drug.   

At the end the program must inform the size of the biggest
given dosage and whether the recommended maximum amount was 
exceeded or not. The surgeon enters the recommended maximum 
amount before the operation starts.