题目
求3到200之间所有非偶数且非素数的数之和,不知道哪里编错了
Private Sub Command1_Click()
s = 0
For a = 3 To 200 Step 2
For b = 2 To a - 1
If a Mod b = 0 Then s = s + a
Next b
Next a
Print s
end sub
Private Sub Command1_Click()
s = 0
For a = 3 To 200 Step 2
For b = 2 To a - 1
If a Mod b = 0 Then s = s + a
Next b
Next a
Print s
end sub
提问时间:2021-03-31
答案
Dim a As Integer,b As IntegerDim s As Integers = 0For a = 3 To 200 Step 2For b = 3 To a - 1If a Mod b = 0 Then s = s + aNext bNext aDebug.Print s这样写,会好一点
举一反三
已知函数f(x)=x,g(x)=alnx,a∈R.若曲线y=f(x)与曲线y=g(x)相交,且在交点处有相同的切线,求a的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
最新试题
热门考点
- 1Mar is going to your birthday party tomorrow.(改为同义句)
- 290°W为14:00时,伦敦的时区时为
- 3材料中属于有机高分子的是?
- 43X3的方格,中间格是空的用1--8(不重复)填数使每横行和竖行相加都是13
- 5he went to Beidaihe last year and this year同义句是什么啊?
- 6怎样在电阻不变的情况下,通过滑动变阻器来改变电阻两端的电压?
- 7音乐是我的救赎,
- 8Are you getting on well with.还是Do you get on well with.哪个对,还是都对
- 9Lucy is the ______(tall) of the two.中间该填什么 Mike sings the_______(well)of the three
- 10when引导的时间状语从句如果主句从句都用一般现在时那么主句必须有助动词吗?