Pseudocode questions 2 - MR. CHARLES HNC IT RESOURCES

advertisement
1. Write a structured algorithm that prompts the user to input two numbers. The algorithm should
calculate and print the sum of the two numbers.
2. Write a structured algorithm that prompts the user to input the number of days in a month.
Calculate and print the number of hours in the month appropriately labelled.
3. Write a structured algorithm that prompts the user to input the name and price of an item and
the quantity purchased. It should print the name, price, quantity and amount due with
appropriate labels.
4. Write a structured algorithm to prompt the user to enter the side length ol a square. Calculate
the area of the square and output it with a suitable label.
5. Write a structured algorithm to request the user to input two numbers which are stored in
variables A and B. The algorithm should subtract It trom A and output the answer with the
message 'Answer is:'.
6. Write a pseudocode algorithm to ask the user to input the radius of a circle. Calculate the
diameter and print it with a suitable label.
7. Write a structured algorithm to input the name of a video tape, the date it was borrowed, the
rental fee charged and the amount of money paid in. Compute the amount of money due back
to the borrower and output it with a suitable label.
8. Write a structured algorithm to prompt the user to input the ages of four of your friends. The
algorithm should allow the user to input these ages, find their average and print it with a
suitable label.
9. Write a structured algorithm to prompt the user to enter the prices for two different per-view
movies. Calculate the amount due and output it with the following message: 'Amount due BCC
Television Ltd.'.
10. Write a pseudocode algorithm to ask the user to input the name of a student, the marks he or
she received in a test and the maximum number of marks in the test. Calculate the percentage
mark the student received. Print the information with suitable labels.
Download