
1条回答 默认 最新
zt13502162671 2021-11-09 09:25关注public class Test(){
public decimal Calculation(decimal Months,int principal){
double r;
decimal year = Math.Ceiling(Months/12);
switch (year){
case 1:r=0.025;break;
case 2:r=0.03;break;
case 3:r=0.037;break;
case 4:r=0.04;break;
case 5:r=0.05;break;
}
return yearrprincipal;
}
}public static void Main(string[] args){
Test test = new Test();
Console.Write(test.Calculation(5*12,10000));//5年,一万元;
Console.Readline();
}差不多就这样吧
解决 无用评论 打赏 举报