我想问我如何用字符串中的符号“ *”表示int的金额例如。
int a=int.parse(console.ReadLine) a=1 then cosole.WriteLine"*" a=2 then write"**"
因此继续3 = *** 4 = ****谢谢
您可以使用String构造函数重载String(char c, int n),该重载将使用字符String(char c, int n)并将其重复c次:
String(char c, int n)
c
n