#include<stdio.h>
void k(unsigned int i,unsigned int j){
static char x[]="0123456789ABCDEF";
if(i>=j) k(i/j,j);
putchar(x[i%j]);}
void main(){
k(20,12);}
___________________________________________
#include<stdio.h>
int test(int a,int b){
if(a==b) return 1;
else if(a>b)return 0;
else return(a+test(a+1,b));
}
main(){
int x;
x=test(0,3);
printf("%d",x);}
____________________________________________________________
#include<stdio.h>
main(){
int x(int,int);
printf("%d\n", x(1,1));}
int x(int m,int n){
if(m==0)return n+1;
if(m>=1&&n==0)
return x(m-1,1);
else
return x(m-1,x(m,n-1));}
______________________________________________________________________
#include<stdio.h>
int f(char *p);
main()
{
char *p="hello";
f(p);
}
int f(char *p)
{
if(*p?f(++p):1)
printf("%c", *(--p));
return 1;
}
_________________________________________________________________
#include<stdio.h>
#define MAIN() main()
#define mAIN() Main()
int MaIn() {printf("Main ");}
int mAIN() {printf("main ");}
int MAIN() {printf("MAIN "); mAIN();}
___________________________________________________________
#include<stdio.h>
void foo(int n){
int m=1;
if(n){m++;
foo(n+1);}
m++;printf("m=%d, n=%d\n", m, n);
}
main(){
foo(-3);}
---------------------------------------------------------------------------------------------------------#include<stdio.h>
main(){
int For;
for(For=0;For<=6;For++)
for(For=0;For<=3;For++)
for(For=0;For<=5;For++)
printf("%d\n", For);
printf("%d\n", For);}
_________________________________________________________________
#include<stdio.h>
#define max(a,b) a>b?a:b
main(){
int m,n;
m=3+max(2,3);
n=2*max(3,2);
printf("%d %d", m, n);}
________________________________________________________________
#include<stdio.h>
int zap(int n){
if(n<=1)
return 1;
else
return(zap(n-3)+zap(n-1));}
main(){
printf("%d\n",zap(6));}
_______________________________________________________________
#include<stdio.h>
#define ceil(x, y) (x+y-1)/y
main(){
int a,b,c;
b=1;c=1;
a=ceil(b&c, sizeof(int));
printf("%d \n", a);}
_________ _______________________________________________
#include<stdio.h>
void revs(char *c) {
if(*c!='\0'){
c++;revs(c++);
printf("%c",*c);}}
main(){
char c[10]="hello";
int n;
n=strlen(c);
revs(c);}
________________________________________________________________