网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
从键盘上输入一个分数(0-100),输出此分数的等级(0-60:不及格;60-70:及格;70-80:中;80-90:良;90-100:优) (使用if else 或者 switch)
参考答案和解析
C
更多 “从键盘上输入一个分数(0-100),输出此分数的等级(0-60:不及格;60-70:及格;70-80:中;80-90:良;90-100:优) (使用if else 或者 switch)” 相关考题
考题
某班学生不到50人,在一次考试中,有1/7人得优,1/3人得良,1/2人及格,其余的均不及格,那么不及格
某班学生不到50人,在一次考试中,有1/7人得优,1/3人得良,1/2人及格,其余的均不及格,那么不及格的人数是 。A.1 B.2 C.3 D.4
考题
【程序说明】从键盘输入学生的学号,在“成绩”表中计算该生的平均成绩,并说明成绩的档次(优、良、中、及格和不及格),如果该生不在表中则提示相应的信息。【程序】SET TALK OFFCLEARUSE 成绩ACCEPT“请输入学生的学号:” TO XH(1)IF (2)?“查无此人!”ELSE(3) 成绩TO CJ FOR 学号=XHDO CASECASE CJ>=90DC=“优”CASE CJ>=80DC=“良”CASE CJ>=70DC=“中”CASE CJ>=60DC=“及格”(4)DC=“不及格”ENDCASE? XH,CJ,DCENDIFUSESET TALK ON(1)A.LOCATE TO 学号= XHB.LOCATE OF 学号=XHC.LOCATE FOR 学号=XHD.INDEX ON 学号=XH
考题
已知x代表某个百分制成绩,下列程序段用于显示对应的五级制成绩,正确的是( )A.If x>=60 Then Print"及格" Else If x>=70 Then Print"中" Else If x>=80 Then Print"良" Else If x>=90 Then Print"优" Else Print"不及格" End IfB.If x<90 Then Print"良" Else If x<80 Then Print"中" Else If x<70 Then Print"及格" Else If x<60 Then Print"不及格" Else Print"优" End IfC.If x>=90 then Print"优" Else If x>=80 Then Print"良" Else If x>=70 Then Print"中" Else If x>=60 Then Print"及格" Else Print"不及格" End If End SelectD.Select Case x Case x>=90 Print"优" Case x>=80 Print"良" Case x>=70 Print"中" Case x>=60 Print"及格" Case Else Print"不及格"
考题
一批数据分别为“60-70”、“70-80”、“80-90”、“90-100”四组,按统计分组的习惯规定,90这一数值应归在( )这一组中。A.“60-70”B.“70-80”C.“80-90”D.“90-100”
考题
设在SQL Server 2008某数据库中有表SC(Sn0,Cn0,Grade),其中Grade列的类型为int。若在查询成绩时,希望将成绩按“优”、“良”、“中”、“及格”和“不及格”形式显示,则下列Case函数中正确的是( )。A.Case GradeWhen Grade between 90 and 100 THEN Grade=ˊ优ˊWhen Grade between 80 and 89 THEN Grade=ˊ良ˊWhen Grade between 70 and 79 THEN Grade=ˊ由ˊWhen Grade between 60 and 69 THEN Grade=ˊ及格ˊElse Grade=ˊ不及格ˊEndB.Case GradeWhen Grade between 90 and 100 THEN ˊ优ˊWhen Grade between 80 and 89 THEN ˊ良ˊWhen Grade between 70 and 79 THENˊ中ˊWhen Grade between 60 and 69 THENˊ及格ˊElseˊ不及格ˊEndC.CaseWhen Grade between 90 and 100 THEN Grade=ˊ优ˊWhen Grade between 80 and 89 THEN Grade=ˊ良ˊWhen Grade between 70 and 79 THEN Grade=ˊ由ˊWhen Grade between 60 and 69 THEN Grade=ˊ及格ˊElse Grade=ˊ不及格ˊEndD.CaseWhen Grade between 90 and 100 THENˊ优ˊWhen Grade between 80 and 89 THEN ˊ良ˊWhen Grade between 70 and 79 THEN ˊ由ˊWhen Grade between 60 and 69 THEN ˊ及格ˊElseˊ不及格ˊEnd
考题
设SC表中记录成绩的列为:Grade,类型为int。若在查询成绩时,希望将成绩按‘优’、‘良’、‘中’、‘及格’和‘不及格’形式显示,正确的Case函数是()。A Case Grade When 90~100 THEN ’优’ When 80~89 THEN ’良’ When 70~79 THEN ’中’ When 60~69 THEN ’及格’ Else ’不及格’ EndB Case When Grade between 90 and 100 THEN Grade = ’优’ When Grade between 80 and 89 THEN Grade = ’良’ When Grade between 70 and 79 THEN Grade = ’中’ When Grade between 60 and 69 THEN Grade = ’及格’ Else Grade = ’不及格’ EndC Case When Grade between 90 and 100 THEN ’优’ When Grade between 80 and 89 THEN ’良’ When Grade between 70 and 79 THEN ’中’ When Grade between 60 and 69 THEN ’及格’ Else ’不及格’ EndDCase Grade When 90~100 THEN Grade = ’优’ When 80~89 THEN Grade = ’良’ When 70~79 THEN Grade = ’中’ When 60~69 THEN Grade = ’及格’ Else Grade = ’不及格’ End
考题
单元格A2输入了数值60,单元格B2存放了公式:=IF(A290,“优”,IF(A275,“良”,IF(A259,“及格”,“不及格”)))。那么B2显示的是()A、及格B、良C、优D、不及格
考题
单选题设SC表中记录成绩的列为:Grade,类型为int。若在查询成绩时,希望将成绩按‘优’、‘良’、‘中’、‘及格’和‘不及格’形式显示,正确的Case函数是()。A
Case Grade When 90~100 THEN ’优’ When 80~89 THEN ’良’ When 70~79 THEN ’中’ When 60~69 THEN ’及格’ Else ’不及格’ EndB
Case When Grade between 90 and 100 THEN Grade = ’优’ When Grade between 80 and 89 THEN Grade = ’良’ When Grade between 70 and 79 THEN Grade = ’中’ When Grade between 60 and 69 THEN Grade = ’及格’ Else Grade = ’不及格’ EndC
Case When Grade between 90 and 100 THEN ’优’ When Grade between 80 and 89 THEN ’良’ When Grade between 70 and 79 THEN ’中’ When Grade between 60 and 69 THEN ’及格’ Else ’不及格’ EndD
Case Grade When 90~100 THEN Grade = ’优’ When 80~89 THEN Grade = ’良’ When 70~79 THEN Grade = ’中’ When 60~69 THEN Grade = ’及格’ Else Grade = ’不及格’ End
考题
问答题编一个程序,输入0—100之间的一个学生成绩分数,用switch语句输出成绩等第(成绩优秀(90-100),成绩良好(80-89),成绩及格(60-79)和成绩不及格(59以下))。
考题
问答题编一个程序,首先输入一个成绩(0到100的整数),用ifelse语句然后判断该成绩是优、良、中、及格还是不及格。
热门标签
最新试卷