做个简单的vfp编程.
发布网友
发布时间:2022-04-22 05:34
我来回答
共3个回答
热心网友
时间:2024-06-19 14:13
1.
clear
input '半径R=' to R
l=6.28*R
s=3.14*R*R
?'圆的周长L=',l
?'圆的面积S=',s
2.
clear
input 'x=' to x
input 'y=' to y
if x<y
z=x*x+2*x*y+y*y
else
if x=y
z=x+y
else
z=x-y
endif
endif
?'函数值为:',z
3.
clear
for i=1 to 9
for j=1 to i
?? allt(str(j))+"×"+allt(str(i))+"="+allt(str(i*j))+" "
endfor
?
endfor
热心网友
时间:2024-06-19 14:13
1.
input 'r=' to r
s=3.14*r*r
?'s=',s
2.
input 'x=' to x
input 'y=' to y
if x<y then
z=x*x+2*x*y+y*y
endif
if x=y then
z=x+y
endif
if x>y then
z=x-y
endif
?'z=',z
3.
for i=1 to 9
for j=1 to i
?? i,'*',j,'=',i*i
endfor
?''
endfor
热心网友
时间:2024-06-19 14:10
1.
input "请输入半径R:" to r
l=pi()*2*r
s=pi()*r*r
?"周长是:",l
?"面积是:",s
2.
input "x=" to x
input "y=" to y
if x<y
z=x^2+2*x*y+y^2
endif
if x=y
z=x+y
endif
if x>y
z=x-y
endif
?"z=",z
3.
clea
for i=1 to 9
for j=1 to i
z=i*j
??str(i,1)+"*"+str(j,1)+"="+str(z,2)+" "
next
?
next