You are on page 1of 3

Start

Declare J as integer

Declare finalcost[1..15] as an Array of real

Declare yom[1..15] as an Array of integer

Declare ageofvehicle[1..15] as an Array of integer

Declare landingcost[1..15] as an Array of real

Declare yom2 as integer

Declare importduty[1..15] as an Array of real

Declare tax[1..15] as an Array of real

Declare chassis[1..15] as an Array of string

Declare brand[1..15] as an Array of string

yom2 = 0

Print “Enter the information of the vehicle to be recorded”

Print “PRESS ENTER TO CONTINUE”

Read

For J = 1 to 15 DO

Print “What is the brand of the vehicle?”

Read brand[j]

Print “What is the age of the vehicle”

Read ageofvehicle[j]

While ageofvehicle[j] >20 do

Print “[ERROR]AGE PASSES THE MAXIMUM! Please try again and enter the correct age”

Print “Please enter the age of the vehicle”

Read ageofvehicle[j]
endwhile

Print “What is the year of manufacture of the vehicle?”

Read yom[j]

yom2 = 2021- ageofvehicle[j]

While yom[j] <> yom2 do

Print “ERROR”

Print “Please enter valid Year of Manufacture”

Read yom[j]

endwhile

Print “Please enter the chasis number”

Read chassis[j]

Print “What is the landing cost of the vehicle?”

Read landingcost[j]

While (landingcost[j] < 300000) or (landingcost[j] > 800000)do

Print “ [ERROR]”

Print “Please enter valid landing cost”

Read landingcost[j]

endwhile

importduty[j] = 0.15 * landingcost[j]

Print “Import Duty =”

If ageofvehicle[j] < 5 then


tax[j] = 0.05 * landingcost[j]

else

tax[j] = 0.1 * landingcost[j];

Print “Tax =”

finalcost[j] = importduty[j] + tax[j] + landingcost[j]

Print “Final Cost =”

Print “Enter the information of the next vehicle to be recorded”

Print “PRESS ENTER TO CONTINUE”

Stop

You might also like