/* sample C-- program; June 2, 2006 */ #define MAX__S 10000 #include "cmm.c" /* C-- v 2.3 */ factorial() { I__2 = 1; loop: I__3 = POP__S(); if(I__3 == 0) goto ends; I__2 = I__2 * I__3; I__3 = I__3 - 1; PUSH__S(I__3); goto loop; ends: PUSH__S(I__2); } main() { INIT__S(); I__0 = 1; scanf("%d",&I__1); if(I__1 <= 0) goto done; PUSH__S(I__1); /* compute factorial */ factorial(); compute: I__1 = POP__S(); I__1 = I__1 - 2; if(I__1 <= 0) goto done; PUSH__S(I__1); I__0 = I__0 * I__1; goto compute; done: printf("%d",I__0); printf("\n"); }