VBS 简单计算题,高手来,速度解决来。。。

[复制链接]
查看11 | 回复3 | 2011-10-21 19:05:11 | 显示全部楼层 |阅读模式
照你说的,a,b,c,d应该只是整数吧?如果是整数就好办。以下代码已测试通过:set fso=createobject("scripting.filesystemobject")set zsc=createobject("scripting.dictionary")if (fso.fileexists("a.txt")) then'打开文件,参数1为forreading,2为forwriting,8为appendingset file=fso.opentextfile("a.txt",2,ture)else'创建文件,参数1为forreading,2为forwriting,8为appendingset f...
回复

使用道具 举报

千问 | 2011-10-21 19:05:11 | 显示全部楼层
a,b,c应该是自然数吧,否则没有答案Dim i,j,k,count,fso,file,valueSet fso=WScript.CreateObject("scripting.filesystemobject")Set file=fso.CreateTextFile("c:\result.txt")file.Closecount=0...
回复

使用道具 举报

千问 | 2011-10-21 19:05:11 | 显示全部楼层
Set fso = CreateObject("Scripting.FileSystemObject")set o =fso.createtextfile("1.txt",true)for a= 0 to 8for b= 0 to 8for c= 0 to 8s=a+b+c if s<13 theno.writeline a&" "&b&" "...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行