QB中怎样计算a+aa+aaa+aaaa+……+aaaaa……aaaa
问题描述:
QB中怎样计算a+aa+aaa+aaaa+……+aaaaa……aaaa
急求~~~~~~~~~
谢谢~~~~~~~~~~~~
答
CLS
INPUT N,A
FOR I=1 TO N
S=S*10+A:K=K+S
NEXT I
PRINT K
END