题干

小沈很久没登录自己的电子邮箱了,这次他想给远方的朋友发封电子邮件,但是密码忘记了,请你帮她尽可能找回密码。她零星记得自己的密码信息如下:

①共八位字符,前两位为字母“zj”,后六位是数字,并以66开头(即密码格式为zj66****);

②最后两位数字相同;

③后六位数能被16和46同时整除。

单击“找回密码”按钮(Command1)后,可能的密码显示在列表框List1中。

第14题图


Private Sub Command1Click()

Dim s As Long , a As Integer, b As Integer, c As Integer, i As Integer

For i = 0 To 9999

  s = 660000 + i

  If        ①      And s Mod 46 = 0 Then 

'(选填字母,从下列A、B 、C、D四个选项中选取一项)

  a = s Mod 10         

  b = (s Mod 100) \ 10

     If        ②       Then  '(选填字母,从下列A、B 、C、D四个选项中选取一项)

     List1.AddItem ("zj" + Str(s))

     c =       ③                '(填程序代码)

     End If

  End If

Next i

Label1.Caption = "共有" + Str(c) + "个"

End Sub

上一题 下一题 0.0难度 选择题 更新时间:2020-02-13 01:45:49

答案(点此获取答案解析)

同类题1

阅读理解

Worlds of Fun

    Location: Worlds of Fun is located off Highway 435 in Kansas City, Missouri.

    History: Worlds of Fun was opened on May 26, 1973, at a cost of 25 million dollars. Loosely themed around the Jules Verne book, Around the World in Eighty Days, the park was founded by Hunt Midwest Company. In 1982, Hunt Midwest bought a nearby waterpark, Oceans of Fun. In 2013, Worlds of Fun and Oceans of Fun were combined to a one ticket admission, providing all guests with access to 235 acres of amusement and water rides.

    Hours: Worlds of Fun is open from April through Halloween.

    Tickets: Buy and print online. Always try to buy your tickets in advance, to save time when you get to the park.

    Reservations: Worlds of Fun sells “Fast Lane” cards that save riders' time by allowing them to bypass the majority of wait for most of rides and attractions including Mamba, Prowler, and Patriot. Ride as many times as you want all day long.

    Strategy: Most visitors tend to begin the day with Prowler, the hottest attraction in the park. Use that tendency to your advantage and head to the Patriot first. After that, try the Dragons. Then work your way back to the Prowler. After riding the Prowler, there is only one coaster left, Mamba. Hit it next. If the park is not very crowded, you can ride Boomerang on the way to Mamba. After riding Mamba, head back for a ride on the Wolf. By then you will have tried most of the popular rides and attractions in the shortest possible time.

    News: In 2017, Worlds of Fun is adding Steel Hawk, a ride that will take guests up 301 feet in the air and spin them at a 45-degree angle for a 60-second flight. Wait to have a try!