题目内容

判断char型变量ch是否为大写字母的正确表达式是 ()。

A. ch>=A&& ch<=Z
B. ch>='A'&& ch<='Z'
C. A<=ch<=Z
D. 'A'<=ch<='Z'

查看答案
更多问题

当a=3,b=2,c=1时,表达式f=a>b>c的值是()

A. 3
B. 0
C. 1
D. 2

试编程判断输入的正整数是否既是5又是7的整倍数。若是,则输出yes;否则输出no,下面程序段哪个能实现()

A.
B. includevoid main(){ int a;scanf("%d",a);if(a%5==0&&a%7==0)printf("yes");else printf("no");}
C. B.
D. includevoid main(){ int a;scanf("%d",&a);if(a%5==0&&a%7==0)printf("yes");else printf("no");}
E. C.
F. includevoid main(){ int a;scanf("%d",&a);if(a%5==0||a%7==0)printf("yes");else printf("no");}
G. D.
H. includevoid main(){ int a;scanf("%d",&a);if(a%5=0&&a%7=0)printf("yes");else printf("no");}

编程计算某年某月有几天。其中判别闰年的条件是:能被4整除但不能被100整除的年是闰年,能被400整除的年也是闰年。

A.
B. includevoid main() { int yy,mm,len; printf("year,month="); scanf("%d %d",yy,mm); switch(mm){ case 1: case 3:case 5:case 7: case 8:case 10: case 12: len=31 ; break;case 4: case 6: case 9:case 11: len=30; break; case 2: if(yy%4==0&&yy%100!=0||yy%400==0) len=29 ; else len=28;break;default: printf("input error");break; } printf("the length of %d %d is %d\n",yy,mm,len);}
C. B.
D. includevoid main() { int yy,mm,len; printf("year,month="); scanf("%d %d",&yy,&mm); switch(mm){ case 1: case 3:case 5:case 7: case 8:case 10: case 12: len=31 ;case 4: case 6: case 9:case 11: len=30; case 2: if(yy%4==0&&yy%100!=0||yy%400==0) len=29 ; else len=28;default: printf("input error");} printf("the length of %d %d is %d\n",yy,mm,len);}
E. C.
F. includevoid main() { int yy,mm,len; printf("year,month="); scanf("%d %d",&yy,&mm); switch(mm){ case 1: case 3:case 5:case 7: case 8:case 10: case 12: len=31 ; break;case 4: case 6: case 9:case 11: len=30; break; case 2: if(yy%4==0&&yy%100!=0&&yy%400==0) len=29 ; else len=28;break;default: printf("input error");break; } printf("the length of %d %d is %d\n",yy,mm,len);}
G. D.
H. includevoid main() { int yy,mm,len; printf("year,month="); scanf("%d %d",&yy,&mm); switch(mm){ case 1: case 3:case 5:case 7: case 8:case 10: case 12: len=31 ; break;case 4: case 6: case 9:case 11: len=30; break; case 2: if(yy%4==0&&yy%100!=0||yy%400==0) len=29 ; break;else len=28;break;default: printf("input error");break; } printf("the length of %d %d is %d\n",yy,mm,len);}

PROFINET 是基于工业以太网的开放的现场总线,可以将分布式I/O设备直接连接到工业以太网,实现从公司管理层到现场层的直接的、透明的访问。

A. 对
B. 错

答案查题题库