Code

FUNCTION Start() AS VOID

LOCAL x, y, z AS INT

LOCAL count AS INT

y := 1

z := 10

FOR x := y TO z STEP 2

   ? x

   ++count

NEXT

?

FOR x := z TO y STEP -2

   ? x

   --count

NEXT

?

FOR x := y UPTO z STEP 2

   ? x

   ++count

NEXT

?

FOR x := z DOWNTO y STEP 2

   ? x

   ++count

NEXT

? count

RETURN

 

 Print  
Copyright 2012 GrafX Software DevelopmentTerms Of UsePrivacy Statement     Login