You are on page 1of 6

Name : unzila nayab

Reg no: 23222


Section : CB
Course ID : 36
Date 03/12/2023

Lab task 01:


Write an algorithm for the multiplication of two user desired numbers?
Answer
#multipication of two numbers
Step 1
Start
Step 2
Input first number num1
Step 3
Input second number num2
Step 4
Mult=num1*num2
Step 5
Stop

For example :

Lab task 02:


Write an algorithm for taking the temperature in C in Fahrenheit ?
Answer
Formula of c & Fahrenheit
(c%5) (F-32%9)
Step 1
Start
Step 2
Input temperature in C
Step 3
(Perform) F=(c*1.8)+32
Step 4
Print Fahrenheit (F)
Step 5
Stop
For example

Lab task 03 :
Writ an algorithm for taking any two numbers from user and display the smaller
number ?
Answer
Step 1
Start
Step 2
Input read two num1,num2
Step 3
Find the smaller number
IF
(num1, num2)
Then
Display num1
Else
Display num2
Step 4
Print smaller number
Step 5
Stop
For example

Lab task 04:


Write an algorithm for taking any two numbers from user display whether it is
even & odd?
Answer
Step 1
Start
Step 2
Input the Number (N)
Step 3
IF(N%2=0)
Then
Print (even Number)
Else
Print (odd Number)
Step 4
Stop
For example

You might also like