фибоначи int f(n){ if((n=1)||(n=2)) return 1; if (n>2) return (f(n-1)+f(n+2) факториал int factorial(int x) { if( x == 0 ) return 1; return x * factorial (x - 1); }
инв строки
void str(char *s, int n)){ if((n==1)||n==0) return; swap(s,s+0-1); str(s++;n-2) } void swap(char*a;char*b){ *a=*b+*a; *b=*a-*b; *a=*a-*b; } обход дерева structs{ int key; s*left; s*right; }*x; void obhod(s*x){ if(x){obhod(x->left); printf(%d,x->key) obhod(s->right) }}
|