0% found this document useful (0 votes)
4 views

lab

Uploaded by

Khaled Shehab
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

lab

Uploaded by

Khaled Shehab
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

1. Get two values to calculate the area of the rectangle.

Output Processing Input


Area Widht*Lenght Width
Length

Pseudocode:

Start

Declear Integer width

Declear Integer lenght

Input length

Input width
Assign Area= Length * Widht

Output Area

End

2. Calculate employee income tax based on the following formula: Tax = 0.25 *
(monthly income * 11 – number of kids * 450) Your program will display the name
of the employee and amount of tax on the screen.

OUTPUT PROCESS INP


UT

display Tax = Emplo


the 0.25 * ye
name (mont incom
of the hly e
employ incom
ee and e * 11 Name
amount –
of tax numbe Numb
on the r of er of
PSEUDOCODE:
screen kids * kids
450)
Integer kids
String NAME
Real income, Tax
Output Enter employe name
Input name
Output Enter employe income
Input income
Outoput enter number of kids
Input kids
Assign TAX=2.25*(monthly incme*11-n uber of kids *450
Output Name& "the amount of tax: "&tax
End
3.Receive an integer from the user, add 5 to it, double it, subtract 7 from it, and
display the final number on the screen.

Output process Input

Display the add 5 to it, double it, Receive an


number on the subtract 7 from it integer
secren

Pseudocode:

Start

Intger Num,Result1,Result
Output "Enter number: "

Input Number

Assign Result1=(num+5)*2

Assign Reselt=Result1-7

Output Result

End

4. Get the radius value and calculate the area and circumference of the circle.

Output Process Input

Display the Calculate the area and Radius value


Result circumference
5. A program that will prompt user to input three characters, receive
those three characters, and display a welcoming message to the screen
such as ‘Hello xxx! We hope you have a nice day’.

Output Process Input

Display Hello Receive them Three characters


xxx hope you
have a nice day

Psedocode:

String char1, char2,char3

String temp1,temp2

Srtring message

Output "enter first char: "

Input char1
Output "enter second char : "

Input second char

Output "enter third char: "

Input char3

Assign temp2 + character3 + "! We hope you have a nice day."

Output" message: "

End
A Program that will assign values to three variables and print them.
The first variable should contain the string ‘Python’, the second should
contain the integer 10, and the third should contain the floating-point
value 98.10.

Output process Input

Display the three values Declare string x

Declare integer y

Declare floating s

Assign x= python

Assign y= 10

Assign s= 98.10
Pseudocode:

Start

String x

Declare Integer Y

Declare Real S

Declare String message

Assign= s

Assign=y

Assign=x

Output" message: "

7. A program that will swap two integer variables.


Output Process Input

Display the two Two integr

8. A Program that will displays the following information: a. Name b. Address with city,
state and poscode c. Telephone number d. Course program

Output process Input

Display the following Name


info
Address with
city(state)and poscode

Tel num

Course program

You might also like