You are on page 1of 1

Name: Vignesh Shenoy

Student Number: 100970143


Ecor 1606 Assignment 1
Question 2:
Create variables: degrees, Run1, Run2
Set degrees to 0
Set Run1 to 18
Set Run2 to 36
Output "A runway facing " degrees " degrees will have runway numbers "Run1"/ "Ru
n2 and an endl.
while(the degrees are less than or equal to 360) do
set degrees= degrees+17
set Run1=0.5+(degrees/10)
if(the degrees is less than or equal to 360)then
if(the Run1 is less than or equal to 18)then
set Run1=int(Run1)
set Run2=Run1+18
Output "A runway facing " degrees " degrees will have ru
nway numbers "Run1"/ "Run2 and an endl.
elseif(Run1>18)
set Run1=Run1-18
set Run1=int(Run1)
set Run2=Run1+18
Output "A runway facing " degrees " degrees will have ru
nway numbers "Run1"/ "Run2 and an endl.
endif
else
Output"Exceeded 360 Degrees"
endif
endwhile

You might also like