怎样将一个C语言程序转换成VB程序

2025-12-25 07:31:32
推荐回答(1个)
回答1:

dim wolf as integer,sheep as integer,cai as integer

for wolf=0 to 1
if wolf=1 then print "wolf":i=i+1
if i=2 then print:i=0
for sheep=0 to 1
if wolf=1 then sheep=0
if sheep=1 then print "sheep":i=i+1
if i=2 then print:i=0
for cai=0 to 1
if sheep=1 then cai=0
if cai=1 then print "cai":i=i+1
if i=2 then print:i=0
next cai
next sheep
next wolf