#includevoidmain(){inta,b,c,d;for(a=100;a<=200;a++){b=a/100;c=(a-100*b)/10;d=a-100*b-10*c;if(b*b*b+c*c*c+d*d*d==a)printf("%d",a);}}(5.0分)
举一反三
- 下列程序的执行结果是( )。 main() {int a=100,b; b=a++>100?a+100:a+200; printf("%d%d",a,b); } A: 101 201 B: 101301 C: 100 200 D: 100 300
- int a=10,b=100; printf("%d,%d\n,", a++,++b); printf("%d", a); 程序的输出结果是
- 若有语句int x=10;b=100;下列printf("a=%d,b=%d”,a,b); 输出结果为( ) A: 10,100 B: a=10,100 C: a=10b=100 D: a=10,b=100
- 以下( )表达式的结果是True。 A: "100" in (100, "50+50", 50+50) B: 100 in ["100", "50+50", 50+50] C: 100 in {"100", "200", "300"} D: "20" in {10:"10", 20:"20"}
- 程序功能:通过指针变量访问整型变量#includevoidmain(){inta,b;int*pointer_1,*pointer_2;a=100;b=10;pointer_1=pointer_2=printf("a=%d,b=%d",a,b);printf("*pointer_1=%d,*pointer_2=%d",*pointer_1,*pointer_2);}