Console.WriteLine("banji"); int p = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("年利率"); int r= Convert.ToInt32(Console.ReadLine()); Console.WriteLine("年数"); int n= Convert.ToInt32(Console.ReadLine()); int i = 1;int a=0; while (i <= n) { a = p * (1 + r) ^ n; p = a; i++; } Console.WriteLine(a); Console.ReadKey();
网友评论