2 Homework Pseudocode

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Pseudocode Homework Name:

Program 1

Write the pseudocode which reads examination marks, one per line of input
data and then outputs the number of passes (marks of 50 or over) and the
number of failures(marks of under 50). To end the input of marks the user
inputs a negative mark.

Program 2

Write the pseudocode which calculates the change which should be given by a
cahier in a shop. The program should calculate the total amount of the
customers transaction, the amount given by the customer to the cashier and the
change to be given to the customer. Zero (0) is to be used to indicate the final
item price has been input.

Program 3

Write the pseudocode that works out if a word is a palindrome or not. The
program requests input 1 word. The program will then work out if the word is a
palindrome (spelt the same forwards as backwards), and output whether this is
a palindrome or not.

Examples of a palindrome are; mum, racecar, level.

(Hint: this is a string related question)

You might also like