You are on page 1of 2

LAB WEEK 1

ALGORITHM

START

DECLARE THE VARIABLE

Declare the name as variable and enter how many words can be entered

Declare the birth of year and age as integer

Declare the current year as the constant integer

INPUT

Greeting the user

Ask for their name and birth of year

PROCESS

Calculate the age of the users:


Age = Current Year – birth of Year

OUTPUT

Print_Greeting the user and display their name


Print_Display the user’s age
FLOWCHART

START
Set the current year =
2021

PROMPT
(Greeting)

INPUT
“Enter your name: “

INPUT
“Enter your birth year: “
PROCESS
Age: current year –
birth year

OUTPUT PRINT
“Welcome (your
name)”
OUTPUT PRINT
“Your age: “

END

You might also like