#include <iostream>
using namespace std;
int funSum(int sum,int k,int A[],int n)
{
if(k>n)return sum;
sum+=A[k];
k++;
funSum(sum,k,A,n);
}
int funMax(int max,int k,int A[],int n)
{
if(k>n)return max;
if(A[k]>max)max=A[k];
k++;
funMax(max,k,A,n);
}
void main()
{
int A[188];
for(int i=0;i<10;i++)
{
A[i]=i;
}
cout<<funSum(0,0,A,9)<<endl;
cout<<funMax(A[0],0,A,9)<<endl;
}
2019-07-17 22:55:46