string str;
int num = 100;
str = Convert.ToString(num);
Console.WriteLine("str[0] = " + str[0]);
Console.WriteLine(str[0]* str[0]* str[0]);
Console.WriteLine("str[1] = " + str[1]);
Console.WriteLine(str[1] * str[1] * str[1]);
Console.WriteLine("str[2] = " + str[2]);
Console.WriteLine(str[2] * str[2] * str[2]);
运行结果:
按道理结果不应该是
1*1*1=1?
0*0*0=0?