您现在的位置是:首页
>
用VB编写arcgis插件 编写一段VBScipt脚本,找出100以内能被3整除的数,并显示输出
编写一段VBSci t脚本,找出100以内能被3整除的数,并显示输出 编写一段VBSci t脚本,找出100以内能被3整除的数,并显示输出for i = 1 to 100if i mod 3 =0 t
编写一段VBScipt脚本,找出100以内能被3整除的数,并显示输出
编写一段VBScipt脚本,找出100以内能被3整除的数,并显示输出
for i = 1 to 100
if i mod 3 =0 then
res = res & i & ","
end if
next
'del last ,
res = left(res, len(res) - 1)
msgbox res
请编写一段VBScipt脚本,其功能是找出100以内能被3整除的数,并显示输出。
for i = 1 to 100
if i mod 3 =0 then
test = test & i & " "
end if
next
msgbox test
复制到记事本,另存为.vbs文件

以下代码保存在**.txt文档中,然后改文本文件名为**.vbsfor a = 1 to 100 if a mod 3 =0 then result = result & a & " " end if next msgbox result
编写一段VBScipt脚本,其功能是输出100以内同时能被3和5整除的数之和
s=0
for i = 1 to 100
if i mod 3 =0 and i mod 5=0 then
s=s+i
end if
next
msgbox s
复制到记事本,另存为.vbs文件
用VFP编写一个程序,输出100以内能被5整除的数,并求它们的和?
SUM=0
FOR I=1 TO 100
IF MOD(I,5)=0
? I
SUM=SUM+I
ENDIF
ENDFOR
? "100以内能被5整除的数的和为",SUM
——前面回答者的语句? I;" "; 在vfp里不能执行
请用Shell脚本编写程序,将100以内能被3或7整除的数的和显示出来.
#!/bin/bashsum=0for i in `seq 1 100`;do a=$[$i%3] b=$[$i%7] if [ $a -eq 0 ]||[ $b -eq 0 ];then sum=$[$sum+$i] fidoneecho $sum用C语言编写程序输出100以内能被7整除的数。
#include<stdio.h>
int main()
{
int i;
for(i = 0; i <=100; i++)
if(i % 7 == 0)
printf("%d ",i);
}
C语言 编写程序,输出100以内能被7整除的数。用continue写
continue是终止这一次的循环,for(i=1;1<=100;i++)
{if(i%7==0)
printf("%d ",i);
else
continue;
}
很赞哦! (1085)