0% found this document useful (0 votes)
8 views3 pages

Pseudo Codes Lab 2

Uploaded by

muhammadumer4790
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)
8 views3 pages

Pseudo Codes Lab 2

Uploaded by

muhammadumer4790
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/ 3

Write pseudocode to find the smallest number among

three given variables. Implement a decision-making


structure to compare the variables.

Start
Input num1,num2,num3
If
Num1<num2 &&num1<num3
Print num1
Elseif
Num2<num1 &&num2<num3
Print num2
Else
Print num3
End
Develop pseudocode for a basic calculator that performs
multiplication and division. The pseudocode should
prompt the user for two numbers and an operator, then
display the result of the operation.

Declare num1,num2,operator,operation
Read num1,num2,operator
If
Operator==*
Operation=num1*num2
Print operation
Else if
Operator==/
Operation=num1/num2
Print operation
End
Create pseudocode to subtract two numbers without
using the - operator. (Hint: Use addition
and complement techniques.)
Start
Declare num1,num2,subtraction
Read num1,num2
Subtraction=num1+( ̴num2+1)
Print subtraction
End

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy