You are on page 1of 4

Flowcharts / Pseudocode and

Programming
This is a program that asks for the lengths and widths of a shape. If all 4 sides of the shape
are the same, it calculates the volume of the square. If 2 pairs of sides are the same, then it
calculates the area of the rectangle. If no pair of sides are matching, then the program
outputs a message saying that the shape is neither a square nor a rectangle.
Medicine calculation
Ask for the users gender and age. For males under 30 the dose is 2, males over 30 the dose is 3.
females under 30 the dose is 1.5 and over 30 the dose is 3. If the female is pregnant then they have a
dose of 1.
Wage calculation with bonus, hours worked, pay per hour. Work over 35 hours get a bonus
The per hour rate at a factory is £7 if they are over 18 and £5 if they are below 18. Calculate if a
worker is entitled to a bonus based on the number of hours they work or their total earnings. If a
person over 18 works over 35 hours or an under 18 year old works over 20 hours. The bonus is
£100. at the end of the program output their total earnings.

You might also like