تعلم لغة الكمبيوتر — الصفحة ٢٤٩

/* fig413.c Demonstrate recursion */ #define /* Program manipulates a string recursively #define #define MAXL 81 CLEARSCREEN "10331052" NULL '1000' '1012' #define LF main() · ( char s[MAXL); int i; puts(CLEARSCREEN); puts("Type a string: \n");. gets(s); for(i=1; i<=3; i++) /* Skip 3 lines */ putchar (LF); triangle(s); مثال (۲) */ /* end main() */ angle(s) :s[MAXL]; /* Print a string, drop first char, repeat. */ if (strlen(s)>0) { puts(s); delete(s,1,1); triangles ) ; } end triangle() */ e(s,i,n) /* Delete n chars, starting with i-th char of s[MAXL]; ;ח, int j,k; char MAXL); strcpy(t,s); i--¡ ٢٤٩ /* Copies s to t */ /* Adjust char to array subscript
ص ٢٤٩

النص مستخرج آليًّا من صور الكتاب، وقد يقع فيه خطأ.