今天下午就要交了!VB编程:用IntputBox函数输入3个数据,如果这3个数据能够成三角形,计算并在窗体上输出三角形的
1个回答

dim a,b,c as single

a=inputbox("a=")

b=inputbox("b=")

c=inputbox("c=")

if ((a+b)>c and (a+c)>b and (b+c)>a) then

x=(a+b+c)/2

s=sqrt(x*(x-a)*(x-b)*(x-c))

msgbox "s=" & s

end if .