resource main import factorial, gl body main() cap factorial fc op gl.answer myanswer fc = create factorial() write("A Program to Compute Factorials") int n put("how many numbers? "); read(n); write() int a[1:n,1:2] write("enter", n, "numbers, separated by whitespace") for [ i = 1 to n ] { read(a[i,1]) } write() for [ i = 1 to n ] { send fc.fact(i,a[i,1],myanswer) } for [ i = 1 to n ] { in myanswer(index,value) -> a[index,2] = value ni } for [ i = 1 to n ] { write(a[i,1], "factorial is", (a[i,2])); } end