例子:#include main (){tips(); /*caller*/printf(“\n Success is about banging on after others have let go”);}tips() /*caller*/{printf (“\n When you reach the end of the rope tie a knot & hang on”,)0;}[上述程序得输出结果如下:When you reach the end of the ropt tie a knot & hang on、Success is about hanging on after others have let go、]#include main(){int a,fact;printf(“\nEnter any number”);scanf(“%d”,&a);fact=rec(a);printf(“Factorial value is%d”,fact);}rec(x);int x;{int f;if(x==1)return(1);elsef=x*rec(x-1);return(f);}[其显示得结果为: Factorial value is 2、]比较两个数较大得那个:#include main(){int a,b,max;scanf (“%d%d”,&a,&b);if (a>b)max=a;else max=b;printf (“%d”,max);}输出 a+b 得值:#include void main(){int a,b,x;scanf (“%d%d”,&a,&b);x=a+b;printf (“%d”,x);}输出 a,b 中最大得一位数:#include int max(int x,int y){int z;if (x>y) z=x;else z=y;return(z);}void main(){int a,b,c;scanf (“%d%d”,&a,&b);c=max(a,b);printf (“%d\n”,c);}输出 Hello:#include int main(){printf (“Hello!”);return 0;}求 1~100 得与:#include int main(){int s,n;s=0,n=1;A: s=s+n;n=n+1;if (n<=100)goto A;printf (“%d”,s);}请输入一个三位数,将其各位逆序输出:(如 153,输出 351)#include void main(){int x,y,a,b,c;printf ("请输入一个三位数得数:");scanf("%d",&x);a=x/100;b=x%100/10;c=x%10;y=c*100+b*10+a;printf ("\n%d",y);}#include void main(){int x,a,b,c,d;printf ("请输入一个三位数得数:");scanf("%d",&x);a=x/100;b=x%100/10;c=x%10;d=c*100+b*10+a;printf ("\n%d\n",d);}买鸡:#include void main(){int x,y,z;if(x>=0&&x<=19,y>=0&&y<=33,z>=0&&z<=100)while (x=19){x=0; 5*x+3*y+z/3==100&&x+y+z==100;x=x+1;}printf("%d%d%d",x,y,z);}y==(100-5*x-z/3)/3&&y==100-x-z;z==(100-5*x-3*y)*3&&z==100-x-y;#include void main(){int x=0,y,z;while (x<=19){5*x+3*y+z/3==100&&x+y+z==100;x=x+1;printf("%d%...