递归额面试题

 1 class Program{
 2 
 3       static void Main(string[] args){
 4 
 5                 Console.WriteLine(Change(8));
 6          
 7 }
 8 
 9      private static int Change(int age){
10 
11          
12    if(age==1){
13 
14             return 10;
15 
16 
17 }else{
18 
19       return Change(age-1)+2;
20 
21 
22 
23 }
24 
25 
26 }
27 
28 
29 }

原文地址:https://www.cnblogs.com/ruyan886621/p/6553449.html