Trusted by millions of Kenyans
Study resources on Kenyaplex

Get ready-made curriculum aligned revision materials

Exam papers, notes, holiday assignments and topical questions – all aligned to the Kenyan curriculum.

With aid of a pseudo code, design an algorithm that would: - Prompt the user to enter two number X and Y - Divide X by Y....

With aid of a pseudo code, design an algorithm that would:
- Prompt the user to enter two number X and Y
- Divide X by Y. However, if the value of Y is 0, the program should display an error message “Error: Division by zero”.

Answers


Kavungya
START
PRINT (“Enter two numbers, X and Y”) Input X, Y
IF Y=0 THEN
PRINT ‘Error: division by zero’
ELSE
Quotient = X/Y
PRINT X, Y, Quotient
END IF
STOP
Kavungya answered the question on April 16, 2019 at 13:12

Answer Attachments

Exams With Marking Schemes

Related Questions