Console.WriteLine("本金");
string str_p=Console.ReadLine();
int p=Convert.ToInt32(str_p);
Console.WriteLine("年利率");
string str_r=Console.ReadLine();
int r=Convert.ToInt32(str_r);
Console.WriteLine("年数");
string str_n=Console.ReadLine();
int n=Convert.ToInt32(str_n);
Console.WriteLine("总金");
int a=p*(1+r)*n;
Console.WriteLine (a); Console.ReadKey();
网友评论