例子:
#include <stdio.h>
main ()
{
tips(); /*caller*/
printf(“ Success is about banging on after others have let go〞);
}
tips() /*caller*/
{
printf (“ 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 <stdio.h>
main()
{
int a,fact;
printf(“Enter 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);
else
f=x*rec(x-1);
return(f);
}
[其显示的结果为: Factorial value is 2.]
比拟两个数较大的那个:
#include <stdio.h>
main()
评论0
最新资源