#include <stdio.h>
int z;
int f1( int x)
{
if (x<=4)
return 8;
else
return x+f1(x-1);
}
int f2( int &x, int & y)
{
x=x+1;
y=y+2;
return x+y;
}
int main()
{
int k=3,m=5,r=0;
printf("1) %d %d \n",f1(k),f2(m,r));
r=f1(m);
printf("2) %d %d \n",r,f2(r,r));
k=f1(r-20);
printf("3) %d %d \n",k,r);
return 0;
}
No comments:
Post a Comment