• 2022-06-26
    下面If语句统计满足职称(用字符串变量duty表示)为副教授或教授、且年龄(用整型变量age表示)小于40岁条件的人数,正确的语句是______。
    A: If age < 40 And (duty = "教授" or duty = "副教授") Then n = n + 1
    B: If age < 40 And duty = "教授" or duty = "副教授" Then n = n + 1
    C: If age < 40 And duty = "教授" or "副教授" Then n = n + 1
    D: If age < 40 Or duty = "教授" And duty = "副教授" Then n = n + 1
  • 举一反三