```1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 ``` ```#include #include #include long F[10000]={0}; long count1=0,count2=0,count3=0,count4=0; void CoinRow(long *c,long n)//币值最大化的动态规划 { F[0]=0; F[1]=c[1]; for(long i=2;i<=n;i++) { F[i]=(c[i]+F[i-2])>F[i-1]?(c[i]+F[i-2]):F[i-1]; count1++; } } long CoinRow1(long *c,long n) //币值最大化的递归算法 { count2++; long temp1,temp2; if(n==0) F[n]=0; else if(n==1) F[n]=c[1]; else { temp1=c[n]+CoinRow1(c,n-2); temp2=CoinRow1(c,n-1); F[n]=temp1>temp2?temp1:temp2; } return F[n]; } void yesangeMaking(long *D,long n,long m) //找零问题的动态规划 { long temp; long j; F[0]=0; for(long i=1;i<=n;i++) { temp=100000; j=1; while(j<=m&&i>=D[j]) { count3++; temp=F[i-D[j]]=D[j]) { (count4)++; s=yesangeMakingDG(D,n-D[j],m); temp=s
 ```1 2 3 4 5 6 ``` ```In function 'CoinRow': Line 10: error: 'for' loop initial declaration used outside C99 mode In function 'yesangeMaking': Line 38: error: 'for' loop initial declaration used outside C99 mode In function 'main': Line 149: warning: return type of 'main' is not 'int' ```