0% found this document useful (0 votes)
3 views2 pages

PSEUDOCODE

The document outlines a simple calculator program that interacts with the user to perform basic arithmetic operations. It prompts for three numbers and calculates their sum, difference, product, quotient, and power, as well as additional operations involving the third number. The program provides feedback by printing the results of each calculation.

Uploaded by

08711abdugani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

PSEUDOCODE

The document outlines a simple calculator program that interacts with the user to perform basic arithmetic operations. It prompts for three numbers and calculates their sum, difference, product, quotient, and power, as well as additional operations involving the third number. The program provides feedback by printing the results of each calculation.

Uploaded by

08711abdugani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

name ← INPUT("What is your name?

")

PRINT("Hey", name, "!")

PRINT("Welcome to my calculator that performs basic calculations including: Addition,


Subtraction, Multiplication, Division, Indices")

a ← INPUT("INPUT Number 1?")

PRINT("Number 1 is", a)

b ← INPUT("INPUT Number 2?")

PRINT("Number 2 is", b)

add ← a + b

PRINT("The sum of the two numbers =", add)

sub ← a - b

PRINT("The subtraction of the two numbers =", sub)

mul ← a * b

PRINT("The multiplication of the two numbers =", mul)

div ← a / b

PRINT("The division of the two numbers =", div)

power ← a ^ b

PRINT("The first number raised to the power of the second number =", power)
c ← INPUT("INPUT Number 3?")

PRINT("Number 3 is", c)

mult ← c * (a + b)

PRINT("Number 3 multiplied by the sum of the first two numbers is", mult)

divi ← c * (a - b)

PRINT("Number 3 multiplied by the subtraction of the first two numbers is", divi)

powe ← (a + b) ^ c

PRINT("The sum of the first two numbers raised to the power of the 3rd number =", powe)

You might also like