Program( [ Declaration("n") , Assign("n", FunCall("readint", []){TypeName("int")}){TypeName("void")} , Declaration("x") , Declaration("fact") , Assign("fact", Int("1"){TypeName("int")}){TypeName("void")} , For( "x" , Int("1"){TypeName("int")} , Var("n"){TypeName("int")} , [Assign("fact", Mul(Var("x"){TypeName("int")}, Var("fact"){TypeName("int")}){TypeName("int")}){TypeName("void")}] ){TypeName("void")} , ProcCall("write", [String("\"factorial of \""){TypeName("string")}]){TypeName("void")} , ProcCall("writeint", [Var("n"){TypeName("int")}]){TypeName("void")} , ProcCall("write", [String("\" is \""){TypeName("string")}]){TypeName("void")} , ProcCall("writeint", [Var("fact"){TypeName("int")}]){TypeName("void")} , ProcCall("write", [String("\"\\n\""){TypeName("string")}]){TypeName("void")} ] )