vb高手帮下忙

来源:百度知道 编辑:UC知道 时间:2024/06/17 08:11:24
高手们帮下忙 用循环语句做一道题,难死我了

我过现有人口13亿。设年增长率1%,编写程序,计算多少钱后增加到20亿?

谢谢你了,麻烦大家帮忙

再窗体上放一个command1和text1
command1_click()
的代码:

dim i as integer
dim str as string

for i=0 to 100000
if 13*(1+0.01)>=20 then
text1.text=i & "年后我国人口增加到20亿" '再文本框里显示结果
exit for
end if
next i