'放四个text1-text4,四个label1-label4,一个command1,调整好大小和位置
'代码如下:
private sub form_load()
label1.caption ="本金"
label2.caption="存款年数"
label3.caption="年利率"
label4.caption="到期利息"
endsub
private sub command1_click()
dim a as single
dim n as integer
dim p as single
dim Lx as single
a=val(text1.text)
n=val(text2.text)
p=val(text3.text)
Lx=a*(1+p)^n-a
text4.text=Lx
end sub
有什么疑问请留言。