以下能够正确计算1+2+3+…+10的程序是( )A.PrivateSubCommand1_Click()Sum=0ForC=1To10Sum=Sum+1NextCPrintSumEndSubB.PrivateSubCommand1_Click()Sum=0,C=1DoWhileC<=10Sum=Sum+1C=C+1LoopPrintSumEndSubC.PrivateSubCommand1_Click()Sum=0;C=1DoSum=Sum+1C=C+1LoopWhileC>10PrintSumEndS

题目

以下能够正确计算1+2+3+…+10的程序是( )

A.PrivateSubCommand1_Click()

Sum=0ForC=1To10

Sum=Sum+1

NextC

PrintSum

EndSub

B.PrivateSubCommand1_Click()

Sum=0,C=1DoWhileC<=10

Sum=Sum+1

C=C+1

Loop

PrintSum

EndSub

C.PrivateSubCommand1_Click()

Sum=0;C=1Do

Sum=Sum+1C=C+1

Loop

WhileC>10

PrintSum

EndSub

D.PrivateSubCommand1_Click()

Sum=0;C=1Do

Sum=Sum+1

C=C+1

Loop

WhileC<10

PrintSum

EndSub