0

im learning the eiffel language and trying to do some basic stuff,as this:

class
    APPLICATION

inherit
    ARGUMENTS

create
    make
feature  
        make
local
        testvar:INTEGER
        i:INTEGER
 do
from
    i := 0
until
    i >= 10

loop
    Io.putstring ("input number")
    Io.read_integer
    testvar:= Io.last_integer
    if
        testvar>=2
    then
        Io.putstring ("bigger")
        i:=i+1
    else
        Io.putstring ("smaller")
        i:=i+1
        Io.put_integer(testvar)
 end
 end    

Basically im just testing a loop wich read integers and print bigger or smaller on screen until "i" reach 10.However,this does not compile,it has to do with my loop I think.What am I doing wrong?

thank you

1 Answers1

0

You are missing 2 "end".You need an "end" to close the "if", another one to close the "loop", another one to close the "make" routine and finally another one to close the Class "APPLICATION". So 4 "end" needed and you have only 2.

Louis M
  • 576
  • 2
  • 4
  • That is true.I didnt know you had to close the Classes,however it makes sense since theres no brackets.Thank you – user5844466 Jan 28 '16 at 21:37