首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
如果在北京时间12点00分运行以下代码,程序的输出是 Sub Procedure() If Hour(Time())>=8 And Hour(Time())12 And Hour(Time())
如果在北京时间12点00分运行以下代码,程序的输出是 Sub Procedure() If Hour(Time())>=8 And Hour(Time())12 And Hour(Time())
admin
2020-06-06
23
问题
如果在北京时间12点00分运行以下代码,程序的输出是
Sub Procedure()
If Hour(Time())>=8 And Hour(Time())<=12Then
Debug.Print"上午好!"
Else If Hour(Time())>12 And Hour(Time())<=18Then
Debug.Print"下午好!"
Else
Debug.Print"欢迎下次光临!"
End If
End Sub
选项
A、欢迎下次光临!
B、上午好!
C、下午好!
D、无输出
答案
B
解析
Time()函数可以返回系统当前时间,Hour(Time())可以返回系统当前时间的小时,本程序中的if~elseif多分支判断语句,判断系统当前时间的小时值,如果在8到12点之间(含8点和12点),则输出“上午好”,如果在12点到18点之间(含18点),则输出“下午好”,除此之外输出“晚上好”,因为当前系统时间为12点,所以输出“上午好”,所以选项B正确。
转载请注明原文地址:https://kaotiyun.com/show/TIcp777K
本试题收录于:
二级Access题库NCRE全国计算机二级分类
0
二级Access
NCRE全国计算机二级
相关试题推荐
在考生文件夹下,已有“samp0.accdb”和“samp1.accdb”数据库文件。“samp0.accdb”中已建立表对象“tTest”,“samp1.accdb”中已建立表对象“tEmp”和“tSalary”。试按以下要求,完成表的各种操作:将表
考生文件夹下存在一个数据库文件“samp2.accdb”,里面已经设计好表对象“tStud”、“tCourse”、“tScore”和“tTemp”。试按以下要求完成设计:创建一个查询,将“tTemp”表中“学分”字段的记录值都上调10%,所建查询命名为
考生文件夹下存在一个数据库文件“samp3.accdb”,里面已经设计好表对象“产品”、“供应商”,查询对象“按供应商查询”和宏对象“打开产品表”、“运行查询”、“关闭窗口”。试按以下要求完成设计:创建一个名为“menu”的窗体,要求如下:当单
在考生文件夹下,“samp1.accdb”数据库文件中已建立好表对象“tStud”和“tScore”、宏对象“mTest”和窗体“fTest”。试按以下要求,完成各种操作:将宏“mTest”重命名保存为自动执行的宏。
在考生文件夹下,“samp1.accdb”数据库文件中已建立好表对象“tStud”和“tScore”、宏对象“mTest”和窗体“fTest”。试按以下要求,完成各种操作:将窗体“ITest”中名为“bt2”的命令按钮,其宽度设置为2厘米、左边界设置为
在考生文件夹下,“samp1.accdb”数据库文件中已建立三个关联表对象(名为“线路”、“游客”和“团队”)和窗体对象“brow”。试按以下要求,完成表和窗体的各种操作:分析“团队”表的字段构成、判断并设置主键。
用Access数据库管理技术处理的数据不仅能存储为数据库文件,还可以以多种文件格式导出数据,但不支持导出的文件格式是
学生表中有姓名、学号、性别、班级等字段,其中适合作为主关键字的是
设二叉树的前序序列为.ABDEGHCFIJ,中序序列为DBGEHACIFJ。则按层次输出(从上到下,同一层从左到右)的序列为
违背数据流图(DFD)构造规则的是
随机试题
前列环素
支气管扩张症的患者,发生大咯血时,禁用垂体后叶素来止血的情况包括
A.聚山梨酯80B.三氯叔丁醇C.磷酸氢二钠D.硫代硫酸钠E.乙二胺四乙酸二钠可作为注射剂增溶剂的是()
当我们的填制凭中发生错误且在审核时未能发现,导致错误登记入账,则应填制一张红字冲销凭证将原错误凭证冲回。()
按照给付期间划分,年金保险可分为()。
培训需求分析是()的前提。
图1为初中物理某教科书中“光的色散”一节的演示实验,关于该实验教学的相关知识错误的是()。
洪武年间发生的与科举有关的大案是()
Large,multinationalcorporationsmaybethecompanieswhoseupsanddownsseizeheadlines.(31)Buttoafargreaterextenttha
WhatisHelen’smajor?
最新回复
(
0
)