class Exc1 { constructor() {} method int foo1(int i) throws int, Exc1 { if (i < 5) then return i else if (i < 20) then return i * 2 else if (i < 30) then throw i + 11 else throw this } method int foo2(int k) throws Exc1 { try return this.foo1(k) + 8 catch int e return 0 } method void main() throws Exc1 { Exc1 o := new Exc1(); String s := ""; "Immetti un numero: ".output(); s.input(); int in := s.toInt(); int f := o.foo1(in); int g := o.foo2(in + 10); "".concat(f + g).concat("\n").output() } }