Sequence Challenges

Write programs for each of the following problems:

1. Develop a program that accepts as data input a number of inches, calculates the equivalent number in centimetres and then display the number of centimetres.

(Note: 1 Inch = 2.54 centimetres).

2. Develop a program that accepts as data input three integer numbers, calculate the sum and the product of the numbers, and display the sum and product. Note: The Sum is an addition of the three numbers and a product is the multiplication of the three numbers.

3. Develop a program that work out an employee’s net pay.  The program should accept as data input the number of hours worked, hourly rate of pay, calculate the gross pay, net pay and display the net pay.  Assume that a constant tax of £30 is deducted for everyone.

4. Develop a program for Sunny Day Tours that will work out the cost of a family holiday.  The program should accept as data input the number of adults and number of children in the party. The program should calculate the hotel bill at £60 per adult, and £20 per child, and calculate the fare as £210 per adult, and £110 per child.  The program should display the total holiday cost.

5. Develop a program that works out the final cost of running a surprise party.  The cost of the buffet is £6.00 a head.  Alcoholic drinks are charged at £2.00 per person.  Assume that everyone present has one drink.  The hall is £40 to hire and the band £150.  The algorithm should calculate the total cost and display the total cost.

6. Develop a program to accept as data input a customer’s surname and forename (individually), and display forename and surname (separated by a space).

Please type the surname of customer : Another
Please type the forename of customer : Customer

Customer Name : Another Customer

Next: Selection